NavigationA theme contains normally two types of navigation templates: a public and a intern one.
Use navigations in your layoutsNavigaion templates are templates which mainly contains a foreach on a navigation variable. To trigger such a template, and therefore to display a navigation in your layout, you need this Smarty function:
{navigation [id=<pageId>] [level=<level>] template="templatePath" [folders="1"]}
Level definition:
So for example for a main navigation you can use this code:
{navigation level="1" template="th_myTheme/navigation_main.tpl"}
Navigation templatesSo, if you've inserted the {navigation} code in your layout then you need to create the specified template file. In this file you have access to all global template variables and function and furthermore access to this special variable which is only present in navigation templates:
$navi is a array and contains all fields from kryn::getPage() and specially the item 'links' which contains all sub pages with the same scheme as $navi and so on.
Example navigation template
Please notice the page modifiers like 'active' and 'realUrl'. It is very important that you use these modifiers in every navigation template.
Public navigationsPublicat navigations are templates like the normal templates, but a user can use this templates in the navigation element. You can define this templates in the extension editor.
|
What is Kryn.cms ?
Administrator
Developer
|

