Hierarchical Groups
Documentation > Concepts > 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:
kingdom.animal.canine.wolf
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 Skins
Skins and skin zones in BoltWire are hierarchical in nature, including things like sidebars, headers, footers, stylesheets (.css), javascripts (.js) etc.. (all of which are actually zones). This means if you were on the wolf page, BoltWire would look for a skin at the following locations -- using the first one it finds:
kingdom.animal.canine.wolf.skin
kingdom.animal.canine.skin
kingdom.animal.skin
kingdom.skin
skin
Note: I found that these skin pages don't take effect unless the name is prefixed with a \"code.\" For example code.kingdom.animal.canine.wolf.skin
If no skin is found, the default skin is used. Skin zones work exactly the same way. To get a feel for what pages are being used in which zone, use the extremely useful "zones" action. The getlink function can be used more specifically in a page as well. For example: [(getlink header)]
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.wolf | full name |
| {p0} | 4 | index of levels in page name |
| {p1} | kingdom | first part of page name |
| {p2}... | animal | second part of page name |
| {page} | Wolf | last 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!
Breadcrumbs
There is a very 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)] would become:
Kingdom? > Animal? > Canine? > Wolf?
This markup uses page titles for the link display, so it is quite configurable. Also note that the BoltWire search engine, uses the breadcrumb function for its default template when no template is specified.
Hierarchies and Authorization
BoltWire's authorization system can also be made hierarchical -- meaning you can allow view and write permissions of kingdom for certain users and group to be passed down to descendent 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.
Examples
| kingdom: @admins |
| Only admins can see page kingdom. Other kingdom pages not specified by this line. |
| kingdom*: @admins |
| 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.

