Share via


SPMobileWebContents De classe

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

Espaço para nome Microsoft.SharePoint.MobileControls
Conjunto de Módulos (Assembly) Microsoft.SharePoint (em microsoft.sharepoint.dll)

A sintaxe

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

Comentários

Para um visão geral da função dessa classe no sistema de processamento página para dispositivos móveis, consulte Página móvel de processamento do sistema.

Fazer não chamar SPMobileWebContents na sua codificar.Ele está documentado para fornecer ainda mais compreensão da Web como móvel páginas são processadas e como o processamento pode ser personalizado.

Para obter informações sobre o processamento da área de conteúdo principal de páginas Other Than o home page, consulte SPMobileListContents.

The <RenderingTemplate> ID takes the following form.

Mobile_WebSiteType_PageType_Contents

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

A parte ** WebSiteType da identificação é determinado pelo SPContext quando o objeto SPMobileWebContents T:Microsoft.SharePoint.MobileControls.SPMobileWebContents é instanciado.

O PageType é o tipo de página, such as homepage ou NewForm.Para todas as finalidades práticas, em Windows SharePoint Services 3.0, esta parte de identificação é sempre homepage.

The "Contents" indicates that <RenderingTemplate> applies to the main contents part of the page.

Para interno site tipos que enviar com Windows SharePoint Services 3.0, WebSiteType é o valor do atributo de nome da CAML<Elemento de modelo (site)> element (of the SharePoint WEBTEMP.XML file).Por exemplo, o valor nome para a definição site blog é "BLOG".Hence, the SPMobileWebContents object defines the following <RenderingTemplate> ID for a mobile blog home page.

Mobile_BLOG_HomePage_Contents

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

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

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

Mobile_10001_HomePage_Contents

O seguinte trecho de arquivo (em C:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES) mostra a MobileDefaultTemplates.ascx a marcação que controla o processamento do conteúdo principal.Observe que há modelos específicos apenas para os tipos site STS, CENTRALADMIN e MPS.All other Web site types use the Mobile_Default_HomePage_Contents <RenderingTemplate>.Portanto, a menos que você fazer alguma personalização (consulte abaixo), no contexto de um site BLOG o objeto SPMobileWebContents T:Microsoft.SharePoint.MobileControls.SPMobileWebContents define um nomeado modelo Mobile_BLOG_HomePage_Contents.Because there is no <RenderingTemplate> with that name, the Mobile_Default_HomePage_Contents <RenderingTemplate> is used.

<SharePoint:RenderingTemplate RunAt="Server" ID="MobileHomePageContents">
  <Template>
    <SPMobile:SPMobileWebContents RunAt="Server" />
  </Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" 
  ID="Mobile_Default_HomePage_Contents">
  <Template>
    <SPMobile:SPMobileComponent RunAt="Server" 
      Templatename="Mobile_STS_HomePage_Contents" />
  </Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" 
  ID="Mobile_STS_HomePage_Contents">
  <Template>
    <mobile:Label RunAt="Server" 
      Text="<%$Resources:wss, mobile_listcategory_geneliclists_text%>" 
      BreakAfter="true" />
    <SPMobile:SPMobileListIterator RunAt="Server">
      <SPMobile:SPMobileList RunAt="Server" 
        TemplateType="Announcements" />
      <SPMobile:SPMobileList RunAt="Server" TemplateType="Categories" />
      <SPMobile:SPMobileList RunAt="Server" TemplateType="Comments" />
      <SPMobile:SPMobileList RunAt="Server" TemplateType="Contacts" />
      <SPMobile:SPMobileList RunAt="Server" TemplateType="Events" />
      <SPMobile:SPMobileList RunAt="Server" TemplateType="IssueTracking" />
      <SPMobile:SPMobileList RunAt="Server" TemplateType="Links" />
      <SPMobile:SPMobileList RunAt="Server" TemplateType="GanttTasks" />
      <SPMobile:SPMobileList RunAt="Server" TemplateType="GenericList" />
      <SPMobile:SPMobileList RunAt="Server" TemplateType="Posts" />
      <SPMobile:SPMobileList RunAt="Server" TemplateType="Tasks" />
      <SPMobile:SPMobileList RunAt="Server" TemplateType="Survey" />
    </SPMobile:SPMobileListIterator>
    <mobile:Label RunAt="Server" 
      Text="<%$Resources:wss, mobile_listcategory_documents_text%>" 
      BreakAfter="true" />
    <SPMobile:SPMobileListIterator RunAt="Server">
      <SPMobile:SPMobileList RunAt="Server" 
        TemplateType="DocumentLibrary" />
      <SPMobile:SPMobileList RunAt="Server" 
        TemplateType="WebPageLibrary" />
      <SPMobile:SPMobileList RunAt="Server" TemplateType="XMLForm" />
    </SPMobile:SPMobileListIterator>
    <mobile:Label RunAt="Server" Text="<%$Resources:wss, 
      mobile_listcategory_pictures_text%>" BreakAfter="true" />
    <SPMobile:SPMobileListIterator RunAt="Server">
      <SPMobile:SPMobileList RunAt="Server" 
        TemplateType="PictureLibrary" />
    </SPMobile:SPMobileListIterator>
  </Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" 
  ID="Mobile_CENTRALADMIN_HomePage_Contents">
  <Template>
    <mobile:Label RunAt="Server" 
      Text="<%$Resources:wss, mobile_sitetemplate_nosupport_text%>" 
      BreakAfter="true" />
  </Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" 
  ID="Mobile_MPS_HomePage_Contents">
  <Template>
    <mobile:Label RunAt="Server" 
      Text="<%$Resources:wss, mobile_sitetemplate_nosupport_text%>" 
      BreakAfter="true" />
  </Template>
</SharePoint:RenderingTemplate> 

Fazer não alteração MobileDefaultTemplates.ascx.For any Web site type, such as BLOG, that does not already have a <RenderingTemplate> defined in MobileDefaultTemplates.ascx, you can override the Mobile_Default_HomePage_Contents <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 de modelo (site)>, such as BLOG, (or the ID of a <Elemento de modelo (site)> 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_Contents to render the footer.(Caso contrário, a personalização seriam inúteis.)

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

Para obter mais informações sobre como personalizar o conteúdo principal página da Web, consulte Walkthrough: Personalizar uma página Mobile Início.

Hierarquia de herança

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.SPMobileWebContents

Segmento de segurança

Qualquer público estático ( compartilhadas Na Visual Basic) os membros desse tipo são segmento seguro. Os membros de instância não são garantia ser segmento seguro.

Consulte também

Tarefas

Walkthrough: Personalizar uma página Mobile Início

Referência

SPMobileWebContents Membros
Microsoft.SharePoint.MobileControls De espaço para nome

Conceitos

Página móvel de processamento do sistema
WebTemp.xml