Share via


SPMobileWebTitle クラス (Microsoft.SharePoint.MobileControls)

特定の Web の種類 (BLOG、STS、またはカスタムの Web の種類) でモバイル ホーム ページのヘッダー領域をレンダリングするときに使用される <RenderingTemplate> の ID を指定します。

名前空間: Microsoft.SharePoint.MobileControls
アセンブリ: Microsoft.SharePoint (microsoft.sharepoint.dll 内)

構文

'宣言
<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 SPMobileWebTitle
    Inherits SPMobileWebTemplateSelector
'使用
Dim instance As SPMobileWebTitle
[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 SPMobileWebTitle : SPMobileWebTemplateSelector

備考

モバイル デバイスのページ レンダリング システムにおけるこの役割の概要については、「モバイル ページのレンダリング システム」を参照してください。

コードで SPMobileWebTitle を呼び出さないでください。これは、モバイル Web ページのレンダリング方法およびレンダリングのカスタマイズ方法についての理解を深めるために文書化されているものです。

ホーム ページ以外のページのタイトル領域のレンダリングの詳細については、「SPMobileListTitle」を参照してください。

<RenderingTemplate> ID は次の形式です。

Mobile_WebSiteType_PageType_Title

"Mobile" は、<RenderingTemplate> がモバイル Web サイト用であることを示すプレフィックスです。

ID の WebSiteType の部分は、SPMobileWebTitle オブジェクトがインスタンス化されたときの SPContext によって決定されます。

PageType は、HomePage、NewForm など、ページの種類です。Windows SharePoint Services 3.0 では実際、ID のこの部分は常に HomePage です。

"Title" は、<RenderingTemplate> がページのヘッダー部分に適用されることを示します。

Windows SharePoint Services 3.0 に付属の組み込みの Web サイトの種類の場合、WebSiteType は (SharePoint WEBTEMP.XML ファイルの) caml <Template 要素 (サイト)> 要素の Name 属性の値です。たとえば、ブログ サイト定義の Name 値は "BLOG" なので、SPMobileWebTitle オブジェクトでは、モバイル ブログ ホーム ページに次の <RenderingTemplate> ID を定義します。

Mobile_BLOG_HomePage_Title

カスタム サイト定義の場合、<RenderingTemplate> の ID の WebSiteType の部分は、(カスタムの WEBTEMP*.XML ファイルの) <Template 要素 (サイト)> 要素の Name 属性ではなく ID 属性の値です。たとえば、次の <Template 要素 (サイト)> 要素を含む WEBTEMPMyCustomSiteDefinitions.XML ファイルがあるとします。

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

SPMobileWebTitle オブジェクトは、モバイル ホーム ページに次の <RenderingTemplate> ID を定義します。

Mobile_10001_HomePage_Title

Windows SharePoint Services 3.0 をインストールすると、最初は特定の Web サイトの種類の <RenderingTemplate> (モバイル ページ ヘッダ用) は定義されていません。組み込みの種類についても同様です。すべてのページで Mobile_Default_PageType_Title <RenderingTemplate> が使用されます。たとえば、次の例は C:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES にある MobileDefaultTemplates.ascx ファイルから抜粋したものです。ここでは、Web サイトの種類にかかわらず、ページの種類が HomePage であれば Mobile_Default_HomePage_Title <RenderingTemplate> が使用されることが示されています (Mobile_Default_HomePage_Title テンプレートは、SPMobileWeb を呼び出してタイトルをレンダリングします)。

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

MobileDefaultTemplates.ascx は変更しないでください。特定の Web サイトの種類の特定のページの種類でヘッダーのレンダリングをカスタマイズするには、...\CONTROLTEMPLATES フォルダに Mobile_WebSiteType_PageType_Title という名前の <RenderingTemplate> を含むカスタム .aspx ファイルを作成します。WebSiteType の部分には、STS、BLOG など、<Template 要素 (サイト)> の名前、またはカスタム サイト定義の場合は <Template 要素 (サイト)> の ID を指定します。また、特定の PageType も指定します。PageType は、"DeletePage"、"DispForm"、"EditForm"、"HomePage"、"NewForm"、"View" のいずれかである必要があります。その後、カスタム <RenderingTemplate> が SPMobileWeb の代わりとなるものを呼び出してヘッダーをレンダリングします。

MobileDefaultTemplates.ascx では、ランタイムは Mobile_Default_PageType_Title <RenderingTemplate> よりも カスタム <RenderingTemplate> を自動的に優先します。

Web ページのタイトルのカスタマイズの詳細については、「[ウォークスルー] モバイル ホーム ページをカスタマイズする」を参照してください。

継承階層

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

スレッドの安全性

この型のパブリックで静的な (Visual Basic では Shared) すべてのメンバは、スレッド セーフです。インスタンス メンバは、スレッド セーフであるとは保証されません。

関連項目

参照

SPMobileWebTitle メンバ
Microsoft.SharePoint.MobileControls 名前空間

その他のリソース

モバイル ページのレンダリング システム
WebTemp.xml
[ウォークスルー] モバイル ホーム ページをカスタマイズする