Page 1 of 1

How do I Pass Variable =$name in URL from Menu?

Posted: Wed Feb 27, 2008 10:25 pm
by portrower8
I created a menu, and then created a LINK item.

Is there a way I can include the $name variable (for whichever user is loggedin) in that link?

Re: How do I Pass Variable =$name in URL from Menu?

Posted: Fri Feb 29, 2008 10:22 pm
by radiant_tech
Is that because the link is external (non-Joomla! content)?

Re: How do I Pass Variable =$name in URL from Menu?

Posted: Mon Mar 03, 2008 12:26 am
by portrower8
yes!

I need to send the username over to a separate site passthru authentication... or whatever it is called.

anyway to do this?

Re: How do I Pass Variable =$name in URL from Menu?

Posted: Mon Mar 03, 2008 1:45 pm
by radiant_tech
Is it a must that the link be part of a menu? You might consider creating a module (its appearance on the Front-end could be simply a clickable image), but that would allow you to collect the username or userid and append it to the URL and then redirect them to the external site.

Re: How do I Pass Variable =$name in URL from Menu?

Posted: Mon Mar 03, 2008 7:24 pm
by portrower8
Hmm... i think it needs to be in the menu because there really needs to be as few clicks as possible.

is ther any way to do that?

Re: How do I Pass Variable =$name in URL from Menu?

Posted: Wed Mar 05, 2008 1:12 pm
by radiant_tech
I haven't found a way yet to accomplish this using the menu system as is.

My suggestion about creating a module would not cause the user to click more than once. By using a module, the user information is gathered as the page is created and the link that is generated would have the user info appended. That way, they click once and it takes them directly to the external site. You're just using the module for its ability to gather the user data and create the link as you need it to be.

Re: How do I Pass Variable =$name in URL from Menu?

Posted: Wed Mar 05, 2008 5:43 pm
by portrower8
where are links stored? could I hard code into the menu a ?username=$username to just be appended on EVERY menu link? where there variable isn't used doens't matter... where it is, it is used?