The values for custom page attributes are persisted together with other page properties, but are not displayed or used anywhere by default. It is up to you to decide how you want to use these values. The most common scenarios are in custom extensions and you can use the Pages API to access values in custom page attributes.
One example of using the value of a custom attribute is when handling the PreRenderComplete event for Sitefinity CMS pages. The following code demonstrates how to do this:
In the code above, you:
Sitefinity CMS fires certain events through the EventHub system, but you can only subscribe to these events after the application has been initialized. To make sure that the application is initialized, you can execute your code in the handle of the Bootstrapper.Bootstrapped event. The first thing to do is to subscribe to this event and have a handler for it.
After you have retrieved the value, you can use it any way you want.
NOTE: As developer, you can decide how you want to use the values of custom page attributes, but you can always access them through the Attributes collection of the PageSiteNode class.
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important