Passing GET parameters to links

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
catfish
Forum Members
Forum Members
Posts: 17
Joined: Wed Nov 18, 2009 4:06 pm

Passing GET parameters to links

Post by catfish »

I'm wondering if it's possible to pass specific (or all) GET parameters from the CMS Made Simple URL on to outbound links? Eg, if someone visits my site at

http://www.example.com/page.html?foo=bar

I'd like CMSMS to see the "foo=bar" and add that to outbound links on the page, so that a link to:

http://www.amazon.com/

is changed to

http://www.amazon.com/?foo=bar

Is that possible somehow? Best case, I can access and check for the existence of specific named variables on some links. As a workable fallback for me, I could just grab all GET parameters from the URL and tack them on to all links.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Passing GET parameters to links

Post by jmcgin51 »

did you check the PHP or Smarty documentation?

http://www.smarty.net/manual/en/languag ... smarty.php

For example, if your CMSms URL is:
www.yoursite.com/index.php?page=home&variable=value

and you wanted to add this to a link in the page, you would do something like:
{capture assign="var_value"}{$smarty.get.variable}{/capture}
click me
Post Reply

Return to “CMSMS Core”