[dokuwiki] Re: Plugin to manipulate the main menu

  • From: Michael Klier <chi@xxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 11 Mar 2009 11:32:14 +0100

On Wed, Mar 11, 2009 at 11:13:08AM +1300, James Lin wrote:
> Hello, could the wiki have an event for generating the menu? so my action
> plugin can append more menu items into the menu array?

No, the button/actionlink generation works on one function call per
button/link basis in the main.php of a template i.e.:

        tpl_button('login')

There is absolutely no way to "insert" buttons/links in a template without
editing the main.php. What you can do is provide a convinience function in
your plugin that end-users can insert in their main.php if they want the
button i.e. plugin_userhomepage_button().

Hope that clears things up,
        Michael

-- 
Michael Klier

www:    http://www.chimeric.de
jabber: chi@xxxxxxxxxxxxxxxxxx
key:    http://downloads.chimeric.de/chi.asc
key-id: 0x8308F551

Other related posts: