Click or drag to resize
HtmlHelperPageMetadataExtensionsPageTitle Method
Renders title element for current page.

Namespace: Kentico.Content.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax
C#
public static IHtmlContentProxy PageTitle(
	this HtmlHelperExtensionPoint htmlHelper,
	string alternateTitle = null,
	Object htmlAttributes = null
)

Parameters

htmlHelper
Type: Kentico.Web.MvcHtmlHelperExtensionPoint
HtmlHelper extension.
alternateTitle (Optional)
Type: SystemString
Title to use when the current page title cannot be retrieved.
htmlAttributes (Optional)
Type: SystemObject
Additional element attributes.

Return Value

Type: IHtmlContentProxy

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type HtmlHelperExtensionPoint. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when htmlHelper is null.
Remarks
When alternateTitle is used the final page title value is composed based on site settings for page title format and prefix. Please note that the macros in page title format are resolved without context of a page.
See Also