BoltWire is a FREE content management system written in PHP.

Its innovative architecture combined with best-in-class forms processing makes it ideal for creating complex, interactive, web applications fast...




Tutorials > Hierarchical Groups

BoltWire has built in support for hierarchical pages, which means when designing the structure of your site, you can create multiple levels in your page names. For example, take this page name:


Basically you have a wolf page in a canine group, which is in the animal group, which is in the kingdom group. You could similarly have pages like kindom.plant.tree or kingdom.mineral or even kingdom.

The advantage of hierarchical pages is that various attributes will be automatically inherited from parent pages down to child pages, greatly simplifying the design of your site.

Hierarchical Zones

Skin zones in BoltWire are hierarchical in nature, including zones like headers and footers. This means if you were on the wolf page, BoltWire would look for a side menu at the following locations -- using the first one it finds:


If no zone page is found, a blank value will be returned for the zone. To get a feel for what pages are being used in which zone, use the "zones" action.

Hierarchies and Authorization

BoltWire's authorization system is also hierarchical -- meaning you can set view and write permissions for groups of pages to certain users and those permissions are passed down to child pages unless overwritten by another setting at a lower level.

To make your permissions hierarchical, remember to supply a trailing asterisk. Below you can see what would happen with various settings applied to site.auth.view. Similar rules apply for site.auth.write, and other permissions pages.


Here's a few examples of settings you might put on a site.config page.

kingdom: @admin

Only admins can see page kingdom. Other kingdom pages not specified by this line.

kingdom*: @admin

Only admins can see kingdom or any descendent pages. This includes kingdom.animal.canine.wolf, etc.

kingdom.animal: @guest
kingdom*: @admins

Guests can see kingdom.animal, but no other kingdom pages. Pages like kingdom.animal.canine.wolf would not be allowed.

kingdom.animal*: @guest
kingdom*: @admins

Guests can see kingdom.animal and kingdom.animal descendents, but only admins could see other kingdom pages, like kingdom.plant. Pages like kingdom.animal.canine.wolf would be visible to guests.

Hierarchical Actions

In BoltWire, site actions are also hierarchical, meaning you can override default actions for specific groups of pages. For more information about this valuable feature, see the actions tutorial.

Page Variables

BoltWire has several shortcuts you can use to refer to specific aspects of the page name. Using the wolf example above, the following page variables are avialable:

{p}kingdom.animal.canine.wolffull name
{p0}4index of levels in page name
{p1}kingdomfirst part of page name
{p2}... animalsecond part of page name
{page}Wolflast part of name, capitalized

Using these page name variables allows you to produce many valuable effects in templates, action pages, forms, links, etc. Learn to use them!


There is a nice breadcrumb function which allows you to display a nice series of links built on the hierarchy of the page name. So on the page above, [(breadcrumb)] produces:

Kingdom > Animal > Canine > Wolf

This markup uses page titles for the link display and has several configuration options. Also note that the BoltWire search engine, uses the breadcrumb function for its default template when no other template or fmt is specified.