DwPageName

Version: - string  

Summary

Returns the name of the current page.

Settings

The value comes from the Page name field for the page.
(Page > General tab > Navigation item panel)

Examples

Outputting the template tag

@GetString("DwPageName")

Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetString("DwPageName"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetString("DwPageName"); }

Outputting the template tag

<!--@DwPageName-->

Check if string has a value

<!--@If Defined(@DwPageName)--> Let's output this tag here: <strong><!--@DwPageName--></strong> <!--@EndIf(@DwPageName)-->