derfelix
11-26-2009, 02:26 AM
Hello,
I ran into a small problem on an external page.
I added a navtab like explained in the articles.. via a plugin..
works fine, thanx again.
But my problem is when i populate the menu, i need variables, like permissions etc, that i can only get once I am on that page..
example: a gallery, with a menu entry :upload images, i must check if the user has permissions to upload, (calculating how many images he has allready uploaded etc...)
this can only be done on the page itself...
I found a workaround, that is NOT very elegant..
Instead of populating the menu in the plugin..
i simply ad a placeholder : |||NAVBARMENU|||
then i create the menu once on the page with its own template..
an then do a
$template_hook['navtab_middle']= str_replace('|||NAVBARMENU|||', $newmenu, $template_hook['navtab_middle'])
just before generating the navbar.
It works fine, but i dont feel comfortable with it...
is there a better way of doing it?
Felix
I ran into a small problem on an external page.
I added a navtab like explained in the articles.. via a plugin..
works fine, thanx again.
But my problem is when i populate the menu, i need variables, like permissions etc, that i can only get once I am on that page..
example: a gallery, with a menu entry :upload images, i must check if the user has permissions to upload, (calculating how many images he has allready uploaded etc...)
this can only be done on the page itself...
I found a workaround, that is NOT very elegant..
Instead of populating the menu in the plugin..
i simply ad a placeholder : |||NAVBARMENU|||
then i create the menu once on the page with its own template..
an then do a
$template_hook['navtab_middle']= str_replace('|||NAVBARMENU|||', $newmenu, $template_hook['navtab_middle'])
just before generating the navbar.
It works fine, but i dont feel comfortable with it...
is there a better way of doing it?
Felix