I am trying to build a breadcrumb using JS and SPServices. When I browse for a page like
http://sharepoint.com/sites/News/pages/f1/f2/default.aspx the breadcrumb should show
SharePoint.com > f1 > f2 > Page Title
Each node should have hyperlink to their URL accordingly.
By using $().SPServices.SPGetCurrentSite(), that is http://sharepoint.com/sites/News/ in above example.
However I have no idea how to get the suffix, or relative path, of the site or subsite (i.e. pages/f1/f2/default.aspx)
By using window.location.pathname, I will get /sites/News/pages/f1/f2/default.aspx which is not my need. I need to get /pages/f1/f2/default.aspx only.
Also, I have some subsites with URL like:
http://sharepoint.com/sites/News/subsite/ http://sharepoint.com/sites/News/subsite/subsub/ http://sharepoint.com/sites/News/subsite/subsubsub/ Hence I need a function always return the "relative path" of the current site. Does this function exist?