Get information about the page which is the contxt for the currently running code.
TabId
Page.PageId
<h3>The .Id attribute:</h3> The id of the current site is (this is the same as <code>TabId</code> in DNN or <code>Page.PageId</code> in oqtane.): <strong> @CmsContext.Page.Id </strong>
<h3>Access all parameters with .Parameters:</h3> Use this to get a string which contains all url parameters: <strong> @CmsContext.Page.Parameters.ToString() </strong>
<h3>Access a specific parameter with .Parameters:</h3> Use this to access the value of a specific url parameter: <strong> @CmsContext.Page.Parameters["c140"] </strong>
Below you'll see the source code of the file. Note that we're just showing the main part, and hiding some parts of the file which are not relevant for understanding the essentials. Click to expand the code
@inherits Custom.Hybrid.Razor14 <!-- unimportant stuff, hidden --> Interface ICmsPage Get information about... <!-- unimportant stuff, hidden --> <h3>The .Id attribute:</h3> The id of the current site is (this is the same as <code>TabId</code> in DNN or <code>Page.PageId</code> in oqtane.): <strong> @CmsContext.Page.Id </strong> <h3>Access all parameters with .Parameters:</h3> Use this to get a string which contains all url parameters: <strong> @CmsContext.Page.Parameters.ToString() </strong> <h3>Access a specific parameter with .Parameters:</h3> Use this to access the value of a specific url parameter: <strong> @CmsContext.Page.Parameters["c140"] </strong> <!-- unimportant stuff, hidden -->