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 (Attachments/Pages/child-pages-icon.png) seen in the bottom right tool bar.

Step 2

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

Attachments/Pages/s_ChildPages-popup.png

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

Attachments/Pages/s_ChildPages-popup-Add.png

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.

Attachments/Pages/s_ChildPages-listing.png

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 (gear) seen in the bottom right toolbar. The Page Properties popup window will be shown.

Attachments/Pages/s_PageProperties-popup.png

Step 2

Attachments/Pages/s_PageProperties-popup.png

Clone this wiki locally