Export (0) Print
Expand All

SPMobileWebNavigation Class

Specifies the ID of the <RenderingTemplate> that is used when rendering the footer area of a mobile home page.

Namespace:  Microsoft.SharePoint.MobileControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class SPMobileWebNavigation : SPMobileWebTemplateSelector

For an overview of the role of this class in the page rendering system for mobile devices, see Mobile Page Rendering System.

Do not call SPMobileWebNavigation in your code. It is documented to provide further understanding of how mobile Web pages are rendered and how the rendering can be customized.

For information on the rendering of the footer area of pages other than the home page, see SPMobileListNavigation.

The <RenderingTemplate> ID takes the following form.

IntendedPageUse_WebSiteType_PageType_Navigation

The placeholders IntendedPageUse and WebSiteType are defined as in Mobile Page Rendering System,

The PageType is the type of page, such as HomePage or NewForm. For all practical purposes, in SharePoint Foundation, this part of the ID is always HomePage.

The "Navigation" indicates that <RenderingTemplate> applies to the footer part of the page.

The following excerpt from the MobileDefaultTemplates.ascx file (in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\CONTROLTEMPLATES) ) shows how the SPMobileWebNavigation is called by the “MobileHomePageNavigation” rendering template.


<SharePoint:RenderingTemplate RunAt="Server" ID="MobileHomePageNavigation">
  <Template>
    <SPMobile:SPMobileWebNavigation RunAt="Server" />
  </Template>
</SharePoint:RenderingTemplate>

The following excerpt from the same file shows one of the built-in rendering templates that might be called, in turn, by the SPMobileWebNavigation object:


<SharePoint:RenderingTemplate RunAt="Server" id="Mobile_Default_HomePage_Navigation">
  <Template>
    <SPMobile:SPMobileHomePageNavigation RunAt="Server" 
       Text="<%$Resources:wss, mobile_navigation_home_text%>"
       AppendWebTitleToText="True" AccessKey="0" />
    <SharePoint:DelegateControl RunAt="server" ControlId="MobileSiteNavigationLink1" />
    <SharePoint:DelegateControl RunAt="server" 
       ControlId="MobileSiteNavigationLink2" />
    <SPMobile:SPMobileLogoutPageNavigation RunAt="Server" 
       Text="<%$Resources:wss, personalactions_logout%>" />
  </Template>
</SharePoint:RenderingTemplate>

If a template with the matching name cannot be found for a specific IntendedPageUse and WebSiteType the IntendedPageUse_Default_HomePage_Navigation <RenderingTemplate> is used.

Do not change MobileDefaultTemplates.ascx or GbwMobileDefaultTemplates.ascx. For any Web site type, such as STS, that does not already have a <RenderingTemplate> defined in MobileDefaultTemplates.ascx or GbwMobileDefaultTemplates.ascx, you can override the IntendedPageUse_Default_HomePage_Navigation <RenderingTemplate> with the following method.

Create a custom .ascx file in the ...\CONTROLTEMPLATES folder that contains a <RenderingTemplate> with the name IntendedPageUse_WebSiteType_HomePage_Contents. Specify the name of a <Template Element (Site)>, such as STS (or the ID of a <Template Element (Site)> for a custom site definition), in place of WebSiteType. Specify an intended page use, such as WebPartMobile for IntendedPageUse. Your custom <RenderingTemplate> then calls a combination of controls different from those used by IntendedPageUse_Default_HomePage_Navigation to render the footer. (Otherwise the customization would be pointless.)

The runtime automatically gives preference to your custom <RenderingTemplate> over the IntendedPageUse_Default_HomePage_Navigation <RenderingTemplate> in MobileDefaultTemplates.ascx or GbwMobileDefaultTemplates.ascx.

For more about customizing Web page footers, see Walkthrough: Customizing a Mobile Home Page.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft