다음을 통해 공유


SPMobilePageNavigation.DefaultTemplateName Property

Gets the value of the ID attribute of the <RenderingTemplate> element that defines the rendering of the navigation (footer) area when the control is on the home page on a mobile Web site.

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

Syntax

'Declaration
Public Overrides ReadOnly Property DefaultTemplateName As String
    Get
'Usage
Dim instance As SPMobilePageNavigation
Dim value As String

value = instance.DefaultTemplateName
public override string DefaultTemplateName { get; }

Property Value

Type: System.String
A String that represents the ID of the template for the navigation area of the home page.

Remarks

In SharePoint Foundation this property always returns "MobileHomePageNavigation". This is the value of the ID attribute of a <RenderingTemplate> element in the file MobileDefaultTemplates.ascx or GbwMobileDefaultTemplates.ascx located in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\CONTROLTEMPLATES.

You must not modify MobileDefaultTemplates.ascx or GbwMobileDefaultTemplates.ascx. To customize the rendering of the home page navigation area, create another <RenderingTemplate> element in a new *.ascx file in the ...\CONTROLTEMPLATES folder. Give your new <RenderingTemplate> element an ID value that is descriptive but likely to be unique. For example, you could add your company name to the end of the ID, such as "MobileHomePageNavigationMyCompanyInc". Then derive a new class from SPMobileComponent (the same parent as SPMobilePageNavigation), and override its DefaultTemplateName property so that it returns your custom ID. Add an object of the new class to the <FooterTemplate> element of a mobile Web page.

Contrast the DefaultTemplateName property with the TemplateName property, which specifies the <RenderingTemplate> when the page is not the home page of the mobile Web site.

See Also

Reference

SPMobilePageNavigation Class

SPMobilePageNavigation Members

Microsoft.SharePoint.MobileControls Namespace