Loading...
 
Skip to main content

Documentation


You are viewing a reply to improving menus

Re : improving menus

Update:
I created a dedicated structure for author resources, using a few tricks:

  • The structure's mother page is HomePage Author and has an "HomePage" alias. It redirects to the doc.t.o homepage
  • There is only one first level page on this structure (author resources). This allows to display the structure in the left hand column menu as desired (since all first level pages are displayed there and we only want one)
  • A few pages in the structure redirect to other pages on tiki.org. This allows to display thoses pages in the structure and the menu-structure.
  • I replaced the menu module in the left hand column by a custom module which contains this smarty code:
    Copy to clipboard
    {menu id=43 decorations=n notitle=y} {if $group neq ''} {menu structureId="HomePage Author"} {/if}

    As you can see, the last menu entry (author resources) is now an automated menu-structure, and is only displayed to non-anonymous (anonymous equal empty $group variable)
    The advantage of this custom module over two separate modules (a menu module and a menu-structure module) is that it is foldable.

Now, if you like this method, it could also be applied to other menu entries, such as the new guides. Then, all pages will be displayed in the menu. You can have a look at http://www.linuxmao.orgQuestion to see these tricks in action on all structures.

olivier