How to add a custom footer navigation to SP2010 Master Page?
-
29-11-2019 - |
Question
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
Solution
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?