Once you have created one or more Navigations on your LiveWhale CMS site, you’ll want to display them in your templates and includes.
In the page template, you can display the current group or section navigation using the following XPHP variables:
||Name of group or section|
||Link to group or section homepage|
||Group or section navigation|
If you want to use the same page template whether or not the page is in a section, use a simple XPHP if/then.
The above code says, “if this page has a section navigation, show that; otherwise, show the group_navigation.”
By default, a LiveWhale navigation will show
Since LiveWhale 2.0, there is a new option to show only the “immediate family” around the currently active page. When enabled, the navigation widget will instead display
You can enable this on a per-widget basis by adding
<arg id="only_immediate_family">true</arg> to your navigation widget, or enable it site-wide by adding this line to livewhale/client/public.config.php.
You can use
<xphp var="group_breadcrumb" /> in your template to display the current group’s navigation in breadcrumb form. For a more advanced display, you can customize your own breadcrumb widget:
|id||Display this navigation by ID||
|main_nav||Display the main navigation for this group (by name)||
|separator||Separate pages with this character||»||
|levels||Display a max number of pages in the path||unlimited||
The above widget options allow you to customize the separator and levels on a per-widget basis, but if you’d like to change them site-wide, you can uncomment and edit the following lines in livewhale/client/public.config.php.
$_LW->REGISTERED_WIDGETS['breadcrumb']['custom']['levels']=0; // max # of levels to show for breadcrumb steps (default: 0 i.e. all levels)
By default, a LiveWhale breadcrumb menu starts from the homepage of your current group and then traverses down the navigation to the currently active page. Since LiveWhale 2.0, there is an additional option for “extended” breadcrumbs that also traverse up into parent directories above the current group’s homepage. You can enable this on your dev site and experiment by adding this line to livewhale/client/public.config.php.