Share via


SPMobilePageNavigation.TemplateName 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 not on the home page on a mobile Web site.

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

Syntax

Public Overrides ReadOnly Property TemplateName As String
    Get

Dim instance As SPMobilePageNavigation
Dim value As String

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

Property Value

Type: System.String
A String that represents the ID of the template for the navigation (footer) area.

Remarks

The following table shows the value of this property for the different page types of a mobile Web site.

Page Type

Rendering Template

List View

"MobileViewNavigation"

List View in a subfolder

"MobileViewNavigationWithFolder"

New Item Form

"MobileNewFormNavigation"

Edit Form

"MobileEditFormNavigation"

Delete Item Form

"MobileDeleteNavigation"

Display Item Form

"MobileDispFormNavigation"

Each of these strings is the value of the ID attribute of a <RenderingTemplate> element in the file MobileDefaultTemplates.ascx located in C:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES.

You must not modify MobileDefaultTemplates.ascx. To customize the rendering of a navigation area for a particular page type (such as the List View type), 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 "MobileViewNavigationMyCompanyInc". Then derive a new class from SPMobileComponent, (the same parent as SPMobilePageNavigation) and override its TemplateName property so that it returns your custom ID when the PageType value of the page is PAGE_VIEW. Add an object of the new class to the <FooterTemplate> element of a mobile Web page.

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

See Also

Reference

SPMobilePageNavigation Class

SPMobilePageNavigation Members

Microsoft.SharePoint.MobileControls Namespace