Dynamic content in article / module

I need to be able to add parameters to a URL defined in the content section of a Module or Article for example (mod custom content).

What is the easiest way to achieve this?

I can do it with {loadmodule: myurlmodule} but that seems a bit heavy.

Is this the best way?
LVL 65
Julian HansenAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What will the URL parameters achieve -- that will help direct the answer.
Julian HansenAuthor Commented:
passing a session variable.

The home page has links to other sites. The site on which this runs will have received an affiliate code in the URL - this affiliate code needs to be added to the other links so that when the visitor clicks the affiliate code is passed through to the next site (different domain)
If you're passing the variable via URL incoming, then do a GET on the originating landing page. Thage page should then set it in $_SESSION. When another page is going to pass that variable to other sites it get get it from $_SESSION.
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Julian HansenAuthor Commented:
no - that is not a viable option as sessions are (for obvious reasons) not shared across domains - and especially not across different physical servers.

the landing page is www.landingpage.com - which contains a link to www.some-other-site-completely.com

The variable in the URL needs to be passed through.

To paint the picture a little more simply

Affiliate has a link like so


Landingpage.com generates a page using the custom content module which contains an image that is a link as follows


I need to be able to have the above url be


In other words:

I need to be able to dynamically add the affcode to the end of the URL in content within the content section of the module.

Currently the only way I have been able to do this is by including a module to create the url like so

This seems like a sledgehammer to crack a nut - hence my original page.

Basically - passing through SESSION is not an option.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OK I see. I can't say I see a better way than what you've described. You're going to need a module or plugin to change the URL. Potentially the search and replace plugin could do this for you but it's less specific to the task than your module solution. I'm saying -- I like the way you solved it.
Julian HansenAuthor Commented:
Thanks - I was just looking for confirmation that I was not making a nube mistake.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.