1

I'm working with the bootstrap for sharepoint project which includes some masterpages and page layouts to help make SP responsive.

While in the masterpage, on the left nav (quick launch) bar, I see links like the following

<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/{0}/viewlsts.aspx" ID="idNavLinkSiteHierarchyV4" />

The string place holder {0} isn't getting replaced and throwing an error. Obviously, I can simply replace with /_layouts/15/ and it will work but I've never seen string placeholders in a masterpage like this. Is there a reason to use these? And likewise make them render out the URL correctly?

0

You should remove the {0} and replace it by /_layouts/15/ I'm also working with a Bootstrap masterpage and this is what I have in my master

<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/_layouts/15/viewlsts.aspx" id="idNavLinkSiteHierarchyV4" Text="<%$Resources:wss,treeview_header%>" accesskey="%$Resources:wss,quiklnch_allcontent_AK%>" CssClass="ms-tv-header" />

If you want to test other master pages this is the free project that I'm using Bootstrap 3 Theme SP2013

  • Yeah, that's what I ended up doing. I guess I was looking more for the "why" because I've never seen this done before and the project authors obviously put it in there for a reason. – Aaron Apr 22 '14 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.