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

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
portrower8
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Feb 27, 2008 10:21 pm

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

Post by portrower8 » Wed Feb 27, 2008 10:25 pm

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?

radiant_tech
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Sat Dec 15, 2007 3:02 pm
Location: Washington DC Metro

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

Post by radiant_tech » Fri Feb 29, 2008 10:22 pm

Is that because the link is external (non-Joomla! content)?
Denise

portrower8
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Feb 27, 2008 10:21 pm

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

Post by portrower8 » Mon Mar 03, 2008 12:26 am

yes!

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

anyway to do this?

radiant_tech
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Sat Dec 15, 2007 3:02 pm
Location: Washington DC Metro

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

Post by radiant_tech » Mon Mar 03, 2008 1:45 pm

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.
Denise

portrower8
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Feb 27, 2008 10:21 pm

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

Post by portrower8 » Mon Mar 03, 2008 7:24 pm

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?

radiant_tech
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Sat Dec 15, 2007 3:02 pm
Location: Washington DC Metro

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

Post by radiant_tech » Wed Mar 05, 2008 1:12 pm

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.
Denise

portrower8
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Feb 27, 2008 10:21 pm

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

Post by portrower8 » Wed Mar 05, 2008 5:43 pm

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?


Post Reply