Compartir a través de


: SPMobileWebNavigation (Clase) (Microsoft.SharePoint.MobileControls)

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

Espacio de nombres:
Ensamblado: Microsoft.SharePoint (in microsoft.sharepoint.dll)

Sintaxis

'Declaración
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public NotInheritable Class SPMobileWebNavigation
    Inherits SPMobileWebTemplateSelector
'Uso
Dim instance As SPMobileWebNavigation
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] 
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
public sealed class SPMobileWebNavigation : SPMobileWebTemplateSelector

Comentarios

For an overview of the role of this class in the page rendering system for mobile devices, see Sistema de representación de páginas móviles.

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.

Mobile_WebSiteType_PageType_Navigation

The "Mobile" is a prefix that indicates that the <RenderingTemplate> is for mobile Web sites.

The WebSiteType portion of the ID is determined by the SPContext when the SPMobileWebNavigation object is instantiated.

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

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

For built-in Web site types that ship with Windows SharePoint Services 3.0, the WebSiteType is the value of the Name attribute of the Lenguaje de marcado de aplicaciones de colaboración (CAML) <Elemento Template (Sitio)> element (of the SharePoint WEBTEMP.XML file). For example, the Name value for the blog site definition is "BLOG". Hence, the SPMobileWebNavigation object defines the following <RenderingTemplate> ID for a mobile blog home page.

Mobile_BLOG_HomePage_Navigation

For custom site definitions, the WebSiteType portion of the <RenderingTemplate>'s ID is the value of the ID attribute of the <Elemento Template (Sitio)> element (in a custom WEBTEMP*.XML file), not the Name attribute. Suppose you have a WEBTEMPMyCustomSiteDefinitions.XML file containing the following <Elemento Template (Sitio)> element.

<Template Name="MyFirstCustomSiteDefinition" ID="10001"> 

The SPMobileWebNavigation object defines the following <RenderingTemplate> ID for the mobile home page.

Mobile_10001_HomePage_Navigation

The following excerpt from the MobileDefaultTemplates.ascx file (in C:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES) shows the markup that controls the rendering of the home page footer. Notice that there is a specific template only for the BLOG Web site type. All other Web site types will use the Mobile_Default_HomePage_Navigation <RenderingTemplate>. So, unless you do some customization (see below), in the context of an STS site the SPMobileWebContents object defines a template called Mobile_STS_HomePage_Navigation. Because there is no <RenderingTemplate> with that name, the Mobile_Default_HomePage_Navigation <RenderingTemplate> is used.

<SharePoint:RenderingTemplate RunAt="Server" ID="MobileHomePageNavigation">
  <Template>
    <SPMobile:SPMobileWebNavigation RunAt="Server" />
  </Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" ID="Mobile_Default_HomePage_Navigation">
  <Template>
    <SPMobile:SPMobileHomePageNavigation RunAt="Server" 
      Text="<%$Resources:wss, mobile_navigation_home_text%>" 
      AccessKey="0" />
    <SPMobile:SPMobileLogoutPageNavigation RunAt="Server" 
      Text="<%$Resources:wss, personalactions_logout%>" 
      AccessKey="*" />
  </Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" 
  ID="Mobile_BLOG_HomePage_Navigation">
  <Template>
    <SPMobile:SPMobilePostsHomePageNavigation RunAt="Server" 
      Text="<%$Resources:wss, moblog_navigation_home_text%>" 
      AccessKey="0" />
    <SPMobile:SPMobileLogoutPageNavigation RunAt="Server" 
      Text="<%$Resources:wss, personalactions_logout%>" 
      AccessKey="*" />
  </Template>
</SharePoint:RenderingTemplate> 

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

Create a custom .aspx file in the ...\CONTROLTEMPLATES folder that contains a <RenderingTemplate> with the name Mobile_WebSiteType_HomePage_Contents. Specify the name of a <Elemento Template (Sitio)>, such as STS (or the ID of a <Elemento Template (Sitio)> for a custom site definition), in place of WebSiteType. Your custom <RenderingTemplate> then calls a combination of controls different from those used by Mobile_Default_HomePage_Navigation to render the footer. (Otherwise the customization would be pointless.)

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

For more about customizing Web page footers, see Tutorial: Personalización de una página principal móvil.

Jerarquía de herencia

System.Object
   System.Web.UI.Control
     System.Web.UI.MobileControls.MobileControl
       Microsoft.SharePoint.MobileControls.SPMobileComponent
         Microsoft.SharePoint.MobileControls.SPMobileTemplateSelector
           Microsoft.SharePoint.MobileControls.SPMobileWebTemplateSelector
            Microsoft.SharePoint.MobileControls.SPMobileWebNavigation

Seguridad de subprocesos

Todos los miembros estáticos públicos (compartidos en Visual Basic) de este tipo son seguros para la ejecución de subprocesos. No se garantiza que los miembros de instancia sean seguros para los subprocesos.

Vea también

Referencia

SPMobileWebNavigation (Miembros)
Microsoft.SharePoint.MobileControls (Espacio de nombres)

Otros recursos

Sistema de representación de páginas móviles
WebTemp.xml
Tutorial: Personalización de una página principal móvil