SPMobileWebTitle 类

指定呈现移动主页的页眉区域时使用的 <RenderingTemplate> ID。

继承层次结构

System.Object
  System.Web.UI.Control
    System.Web.UI.WebControls.WebControl
      Microsoft.SharePoint.Mobile.WebControls.SPMobileComponent
        Microsoft.SharePoint.Mobile.WebControls.SPMobileTemplateSelector
          Microsoft.SharePoint.Mobile.WebControls.SPMobileWebTemplateSelector
            Microsoft.SharePoint.Mobile.WebControls.SPMobileWebTitle

命名空间:  Microsoft.SharePoint.Mobile.WebControls
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class SPMobileWebTitle _
    Inherits SPMobileWebTemplateSelector
用法
Dim instance As SPMobileWebTitle
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class SPMobileWebTitle : SPMobileWebTemplateSelector

备注

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

不要在代码中调用SPMobileWebTitle 。记录提供呈现进一步了解如何移动网页和如何自定义呈现方式。

而不是主页的页面的标题区域的呈现方式的信息,请参阅SPMobileListTitle

<RenderingTemplate> ID 采用以下形式。

IntendedPageUse_WebSiteType_PageType_Title

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

PageType是页面,例如主页或 NewForm 的类型。对于所有实际情况,在SharePoint Foundation,此 ID 的部件始终是主页。

"Title"指示该 <RenderingTemplate> 应用于的页面页眉部分。

以下示例摘自MobileDefaultTemplates.ascx文件 (在%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\CONTROLTEMPLATES)) 显示SPMobileWebTitle由"MobileHomePageTitle"呈现模板。

<SharePoint:RenderingTemplate RunAt="Server" ID="MobileHomePageTitle">
  <Template>
    <SPMobile:SPMobileWebTitle RunAt="Server" />
  </Template>
</SharePoint:RenderingTemplate>

以下示例摘自同一文件显示可能会调用,接下来,由SPMobileWebNavigation对象的内置呈现模板之一:

<SharePoint:RenderingTemplate RunAt="Server" id="Mobile_STS_HomePage_Title">
  <Template>
    <mobile:LiteralText RunAt="Server" 
       Text="<%$Resources:wss, viewlsts_pagetitle_doclist%>" 
       BreakAfter="false" />
    <mobile:LiteralText RunAt="Server" 
       Text="<%$Resources:wss, mobile_listtitle_separator%>" 
       BreakAfter="false" />
    <WPMobile:WebPartMobilePageTitle RunAt="Server" />
  </Template>
</SharePoint:RenderingTemplate>

如果特定IntendedPageUse和WebSiteType找不到具有匹配的名称的模板,则使用IntendedPageUse_Default_HomePage_Title <RenderingTemplate>。

Do not change MobileDefaultTemplates.ascx or GbwMobileDefaultTemplates.ascx. To customize the rendering of the header for a particular page type of a particular web site type, create a custom .aspx file in the ...\CONTROLTEMPLATES folder that contains a <RenderingTemplate> with the name IntendedPageUse_WebSiteType_PageType_Title. Specify an intended page use, such as WebPartMobile for IntendedPageUse. Specify the name of a <Template>, such as STS, SGS, or BLOG, (or the ID of a <Template> for a custom site definition) in place of WebSiteType. Your custom <RenderingTemplate> then calls a combination of controls different from those used by IntendedPageUse_Default_HomePage_Title to render the header. (Otherwise the customization would be pointless.)

运行时自动通过在MobileDefaultTemplates.ascxIntendedPageUse_Default_PageType_Title <RenderingTemplate> 赋予首选项设置为您的自定义 <RenderingTemplate>。

For more about customizing Web page titles, see Walkthrough: Customizing the Mobile Home Page.

线程安全性

该类型的任何公共 静态 (已共享 在 Visual Basic 中) 成员都是线程安全的。不保证任何实例成员都是线程安全的。

另请参阅

引用

SPMobileWebTitle 成员

Microsoft.SharePoint.Mobile.WebControls 命名空间

其他资源

Mobile Page Rendering System

WebTemp.xml

Walkthrough: Customizing the Mobile Home Page