Get information about the view context.
<h3>The .Edition attribute:</h3> Get information about the edition used (otherwise it returns an empty string): <strong> @CmsContext.View.Edition </strong>
<h3>The .Id attribute:</h3> Get the id of the view configuration: <strong> @CmsContext.View.Id </strong>
<h3>The .Identifier attribute:</h3> An optional identifier which the View configuration can provide. Use this when you want to use the same template but make minor changes based on the View selected (like change the number of columns). Usually you will use either this OR the Settings: <strong> @CmsContext.View.Identifier </strong>
<h3>The .Name attribute:</h3> Name of the view as configured - note that because of i18n it could be different depending on the language. To clearly identify a view, use the Identifier or use Settings: <strong> @CmsContext.View.Name </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 ICmsView Get information about... <!-- unimportant stuff, hidden --> <h3>The .Edition attribute:</h3> Get information about the edition used (otherwise it returns an empty string): <strong> @CmsContext.View.Edition </strong> <h3>The .Id attribute:</h3> Get the id of the view configuration: <strong> @CmsContext.View.Id </strong> <h3>The .Identifier attribute:</h3> An optional identifier which the View configuration can provide. Use this when you want to use the same template but make minor changes based on the View selected (like change the number of columns). Usually you will use either this OR the Settings: <strong> @CmsContext.View.Identifier </strong> <h3>The .Name attribute:</h3> Name of the view as configured - note that because of i18n it could be different depending on the language. To clearly identify a view, use the Identifier or use Settings: <strong> @CmsContext.View.Name </strong> <!-- unimportant stuff, hidden -->