Page 1 of 1

Passing GET parameters to links

Posted: Sun Feb 07, 2010 5:11 pm
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.

Re: Passing GET parameters to links

Posted: Sun Feb 07, 2010 10:31 pm
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