-
Notifications
You must be signed in to change notification settings - Fork 12
Pages
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.
While logged in as the administrator, navigate to a page where you want to add a new page as a "child" page and click the "Child Pages" icon (
) seen in the bottom right tool bar.

Select the "Add" button shown in the bottom right corner of the child page list.

Give the page a name and choose the layout you want to use, then press the Add button.

Your new page will be listed in the child page listing. You can add another page, press "Done", or click on the page to view or edit the page.

To change a page's settings (such as marking it to appear in a navigation, changing its layout or name or parent page, etc.) follow these steps.
While viewing the page as an administrator, press the Page Properties icon (
) seen in the bottom right toolbar. The Page Properties popup window will be shown.

Choose one of the appropriate options and then make your changes. For example, to change when the page should appear in the menu or whether or not it's child pages should be listed, select the Menu Display button and then make your changes.

Press "Save".
To add blocks to a page, start at Step 3 on the Building Your First Custom Block page.