Skip to content
nairdo edited this page Nov 1, 2012 · 7 revisions

A page is defined to Rock and is a container for Blocks.

Useful Page Properties

The following are some basic properties and methods of the Page class that you will find useful.

  • Setting the OutputCacheDuration property 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 CurrentPerson property 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.

Adding Pages to Rock

Step 1

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.

Step 2

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.

Step 3

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.

Page Properties

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.

Step 1

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.

Step 2

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.

Step 3

Press "Save".

Adding Blocks to a Page

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

Clone this wiki locally