What

This recipe will show you how to:

  1. Add a search box to any Rock Settings page that filters down the list of child pages as you type
  2. Create a page for quickly viewing and searching all setting pages
  3. Sort Setting Child Page links alphabetically by running a small SQL update statement

Why

It is not immediately clear what settings are found under what pages. Navigating to a setting page can also be difficult because the child pages are not sorted in alphabetical order. Implementing this recipe will save time/clicks especially for new admins in Rock.

How

1. Adding a search box to a Rock Settings page

Here is what we are going to create:

Settings_Page_With_Search_Box.png

When you start typing in the search box any page whose name does not contain the search term will disappear.

For example just these two pages are left to click on after I type the search term "Tag".

Settings_Page_With_Search_Box_Search_Term_Tag.png

Setup
  1. Navigate to your theme's lava folder on the webserver. For me it was C:\inetpub\wwwroot\Themes\Rock\Assets\Lava
  2. Add a new lava file with the name "_org_yourchurchname_PageListAsBlocks" with this code: https://pastebin.com/yZZ0izmX
  3. Navigate to a Settings page such as the "CMS Configuration" page.
  4. Update the Page Menu block on this page. Change the Template field to point the the lava file we just created.Screenshot_2021-12-22_174006.png

2. Create an All Rock Settings page

Here is what we are going to create:

This page will have a panel for each child page under Admin Tools.

Screenshot_2021-12-30_100545.jpg


Setup
  1. Navigate to your the theme's lava folder on the webserver. For me this was C:\inetpub\wwwroot\Themes\Rock\Assets\Lava
  2. Add a new lava file with the name "_org_yourchurchname_PageListAsBlocksDepthTwo" with this code: https://pastebin.com/n0jBY3yS
  3. Under the Rock Settings Page add a child page called "All Settings".
    Screenshot_2021-12-30_102228.jpg
  4. Add a Page Menu block to the page.
  5. Change the Template field setting in your Page Menu block to point the the lava file we just created.
    image.png
  6. Set the Root Page setting in your Page Menu block to "Rock Settings".

3. Sort Setting Child Page links alphabetically on all Setting Pages

This can be quickly accomplished by running an update SQL statement via SSMS or the SQL Command page under Power Tools.

After clearing the cache the pages on each setting page will show up in Alphabetical order.

Screenshot_2021-12-30_113855.jpg