Board Logo

parameters in menu urls
janbear - 2/21/2003 at 04:03 AM

How to I add ?username=$username
to each url.

In short how do I tell the menu items file
the value of $username and how do I append it each url.

Thx .... New at Java

nik - 2/21/2003 at 07:58 AM

You have to build menu hierarchy descriptional file dynamically on server side. To do so rename appropriate file (items.js or menu_items.js) to the one with extention you need: items.php, for example. And then you can write any server-parsed code there.

janbear - 2/25/2003 at 02:47 AM

Thx Nik.

One more problem.
I use cgi which looks for an http header for the script to execute properly.

Can I modify the items.js to run a function with the value of $username as input and then create var MENU_ITEMS ?
If yes, are they any tutotials that explain
such a process?


nik - 2/25/2003 at 08:10 AM

Sure, you can modify items.js in a way you need it. It is possible to generate MENU_ITEMS variable depending on any input parameters. The only thing Tigra Menu needs from items.js is correct declaration of items hierarchy, and it does not care of how you build this declaration on a server side. So I think you should just read some Perl (CGI) tutorials.

Back to forum: