forked from SparkDevNetwork/Rock
-
Notifications
You must be signed in to change notification settings - Fork 12
Pages
Nick Airdo edited this page Oct 29, 2012
·
7 revisions
A page is defined to Rock and is a container for Blocks.
The following are some basic properties and methods of the Page class that you will find useful.
- Setting the
OutputCacheDurationproperty to anything greater than 0 (seconds) will cache its rendered output for performance considerations (use when appropriate). - The
AttributeValue(attributeName)method can be used to get the value of any attribute associated to the instance of the page. - The
CurrentPersonproperty represents the currently authenticated (logged in) person and the CurrentPersonId is that person's ID. -
DisplayInNavWhen– Determines when a page should be listed in navigation. Valid values are: -
WhenAllowed(0) - Only shows in nav when security allows (default). -
Always(1) - Always shows up. If you don't have security when you click it, it will ask you to log in. This keeps you from having to make redirect pages. -
Never(2) - will never show up in the navigation. -
MenuDisplayDescription– Tells the drop down menu to add the description to the page's listing. -
MenuDisplayIcon– Tells the drop down menu to add the icon to the page's listing. -
MenuDisplayChildPages– Tells the drop down menu to add a list of child pages to the page's listing.