DwPageID

Version: - integer  

Summary

Returns the page ID of the current page.

Settings

The value is generated automatically.

Remarks

DwPageID can be used throughout the Dynamicweb system. It uniquely identifies each page of the website.
The page ID is included in the page URL as the ID parameter, e.g. Default.aspx?ID=3617

Examples

Outputting the template tag

@GetInteger("DwPageID")

Check if tag has a value

@if(!int.IsNullOrWhiteSpace(GetInteger("DwPageID"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ int storedTag = GetInteger("DwPageID"); }

Outputting the template tag

<!--@DwPageID-->

Check if integer has a value

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