Smarty site menu items list plugin. Plugin outputs list of site menu item titles.


    Attribute Name Type Required Default Description
    collection string No n/a Template variable name containing associative array of collections. Collection can be connected to menu item via item name
    id string No n/a ID attribute assigned to list <ul> tag
    class string No sf-menu Class attribute assigned to list <ul> tag
    class_current string No current Class attribute assigned to list current item <li> tag
    active integer No 0 1 - turn on PHP Docs left menu style
    active_last integer No 0 1 - turn on PHP Docs center menu style: show menu list starting from last active menu tag in hierarchy of menu list (only when active=1)
    class_current_top string No current-top Class attribute assigned to first current <li> tag in hierarchy of menu list (only when active=1) - PHP Docs left menu style
    class_current_prev string No current-prev Class attribute assigned to last-1 current <li> tag in hierarchy of menu list (only when active=1) - PHP Docs left menu style
    uc integer No 0 1 - convert menu item title into upper case
    start integer No 1 Menu hierarchy level to start
    seq string No n/a Unique menu item ID to start
    no integer No n/a Menu item no to be starting in there no current and start > 1
    depth integer No 10 Menu hierarchy level depth
    meta string No n/a Type of metadata to be assigned to attribute "title" of <li> tag. Possible values:
    • "title" - menu item title
    • "title_full" - page extended title
    • "description" - page description
    restful integer No 0 Type of URL to identify current position in menu hierarchy:
    • 0 - URL taken from page URL
    • 1 - URL taken from request URI (with request parameters)

    Sample 1. Simple menu list (start=1, depth=1):

    {mnu id="sample-id" class="sample-class" start="1" depth="1"}

    Above will output:

    <ul id="sample-id" class="sample-class"> <li><a href="http://www.kusoftas.com/docs">Docs</a></li> <li class="current"><a href="http://www.kusoftas.com/programming">Programming</a></li> <li><a href="http://www.kusoftas.com/how-to">How-To</a></li> <li><a href="http://www.kusoftas.com/docs/samples">Samples</a></li> <li><a href="http://www.kusoftas.com/cms/srv/admin">CMS Demo</a></li> </ul>

    Sample 2. PHP Docs style left menu:

    {mnu id="sample-id" class="sample-class" start="2" active="1"}

    Above will output:

    <ul id="sample-id" class="sample-class"> <li class="current current-top"><a href="http://www.kusoftas.com/programming">Programming</a></li> </ul> <ul id="sample-id" class="sample-class"> <li class="current current-prev"><a href="http://www.kusoftas.com/programming/template-plugins">Template Plugins</a></li> </ul> <ul id="sample-id" class="sample-class"> <li><a href="http://www.kusoftas.com/programming/template-plugins/gettext-block-t">Gettext Block (t)</a></li> <li><a href="http://www.kusoftas.com/programming/template-plugins/languages-list-lng">Languages List (lng)</a></li> <li class="current"><a href="http://www.kusoftas.com/programming/template-plugins/menu-list-mnu">Menu List (mnu)</a></li> </ul>

    Sample 3. Sample collection connected to menu item "Products" via name "catalog":

    {col var="col" name="catalog"} {mnu depth="2" collection="col"}

    Above will output (www.samplesite.com - will be replaced with your actual site URL):

    <ul> <li><a href="http://www.samplesite.com/eng/about-us">About us</a></li> <li><a href="http://www.samplesite.com/eng/news/actual">News</a></li> <li><a href="http://www.samplesite.com/eng/activity">Activity</a></li> <li> <a href="http://www.samplesite.com/eng/products">Products</a> <ul> <li><a href="http://www.samplesite.com/catalog/electronic">Electronic</a></li> <li><a href="http://www.samplesite.com/catalog/industry">Industry</a></li> <li><a href="http://www.samplesite.com/catalog/printing">Printing</a></li> <li><a href="http://www.samplesite.com/catalog/typesetting">Typesetting</a></li> </ul> </li> <li><a href="http://www.samplesite.com/eng/partners">Partners</a></li> <li><a href="http://www.samplesite.com/eng/contacts">Contacts</a></li> <li><a href="http://www.samplesite.com/cms/srv/admin">CMS</a></li> <li><a href="#login">Login</a></li> <li><a href="#logout">Logout</a></li> </ul>

    Vulnerability Scanner