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 63
Julian HansenAsked:
Who is Participating?
Julian HansenConnect With a Mentor Author 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.
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)
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

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.
joomla_phpConnect With a Mentor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.