1

I'd appreciate any suggestion on how to add a custom footer navigation similar to the one found at http://www.washington.edu to a master page?

The link doesn't have to be automatically generated as long as the user can add/remove links and their heading. Initially I thought I can just use several Summary Link Web Parts and control their position using CSS. But unfortunately Master Pages don't support web part zones.

The only other option I know is to use visual web parts to retrieve the links from a SharePoint list. I'd appreciate just some brief direction on how to implement this using Visual Web Part or any other method.

Cheers,

Ahmed

3
  • 1
    You can insert webparts in your MasterPages through the SharePoint Designer interface.
    – user2536
    Commented Oct 3, 2011 at 6:59
  • I see. but Ziga, if a user changes the links in the web part will it show on all the pages that are using the master page or just in that particular page? Commented Oct 3, 2011 at 10:14
  • As the webpart is placed on the MasterPage it will of course appear on all pages and sites using this particular masterpage.
    – user2536
    Commented Oct 3, 2011 at 11:01

1 Answer 1

3

WebParts (including SummaryLinkWebPart) are simply classes of type Control, so they can be directly added to the masterpage, as Ziga pointed out.

First you'll need to add a TagPrefix to the top of your masterpage with the rest of the Tagprefixes to load the appropriate assembly:

<%@ Register Tagprefix="SharePointPublishingControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 

Next, you load in SummaryLinkWebPart where you need it:

<SharePointPublishingControls:SummaryLinkWebPart runat="server" ID="FooterLinksOne" />

See how this works, and look here for more properties that are avilable: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.webcontrols.summarylinkwebpart_members.aspx

One thing I'm thinking of though, is the storage mechanism for the properites (in this case, the links themselves) I believe are stored at the URL level, so it might make this web part useless in this scenario (each page will have to have the properties set manually). Infact, someone confirm for me please if this only happens inside a WebPartZone?

1
  • I'd really appreciate it if you could provide me a sample or example or a web page that shows how to do that. Thank you for your help, James. Commented Oct 3, 2011 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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