#173 Include User Menus in (Wiki) Pages

open
nobody
None
5
2005-05-20
2005-05-20
Ralph Bolton
No

Working with Tiki 1.9 (although pretty much the same
for 1.8.5)

As delivered, it is not possible to include a user menu
into a wiki page (or any text, except a user module).
This patch makes that possible.

Benefits are:
1) Wiki pages can include menus
2) It would be possible to construct a module that
somehow references Wiki data to build the module box's
contents.

WRT (2), I'm working on something along these lines. At
present, I have a (messy) module that looks up the
category of the current page. It then attempts to load
a Wiki page with that name (prefixed with "Menu"). The
idea being that the module shows context sensitive
information as you move around the Wiki. If there's no
category, of no wiki page with that name, it uses
MenuDefault instead.

Besides "completing" the various elements that can be
incuded into text, this patch facilitates a completely
customisable navigation system, which could be useful
for many websites. Clearly, the actual
wiki-data-in-module is required too (I'm working on it!).

The patch is pretty simple, and is attached. Once
applied, simply create a Wiki page that contains the
content:

{menu id=42}

...and that menu will appear on the page (ie. the page
itself, not in the left or right side bars)

Discussion

  • Ralph Bolton
    Ralph Bolton
    2005-05-20

    Patch file for tikilib.php to allow Menus in Wiki Pages

     
    Attachments
  • Ralph Bolton
    Ralph Bolton
    2005-05-20

    • summary: Include User Menus in (Wki) Pages --> Include User Menus in (Wiki) Pages
     
  • Ralph Bolton
    Ralph Bolton
    2005-05-20

    Logged In: YES
    user_id=802047

    Sorry, forgot to mention, you need to create a template file
    called
    templates/eval.tpl - it must contain the following single line:

    {eval var=$data_to_eval}