Passing information inside the URL

From Online Business Wiki

(Redirected from Module url)
Jump to: navigation, search

The system has a module you can use in your web pages that that allows you to capture information that you have appended to a URL. That module is {module_url}. What does this mean? Well say you want to pre-populate a bookings web form with a package name of some sort.

Let's make the URL of the page www.mysite.com/bookingform.htm

So I have a range of packages who's details are on other, different pages. When someone clicks on the links I need to know which package they were looking at, and pre-populate the web form with the package that they actually want to book.

So I can put the package name in the URL, like this:

www.mysite.com/bookingform.htm?package=Platinum

And for other packages it might look like this:

www.mysite.com/bookingform.htm?package=Gold

or

www.mysite.com/bookingform.htm?package=Silver

You get the idea.

Now this is where {module_url} comes in - it allows me to retrieve what comes after "package=". You use it by putting the module in the HTML of your page, including what you have put before the "=" sign.

So in this case, I would put {module_url,package} to retrieve either Platinum, Gold or Silver.

Below are some steps to use this module.

1. Insert a link to your page with the form on it manually using the link manager, and then modify the link to add "arguments" to the URL. So when you are done, the link would be like this:

www.mysite.com/bookingform.htm?package=Platinum

2. Then go to the page with the actual form on it. Then, in a text box on the form (or in javascript even) you put {module_url, <parameter>}. In this example you would put { module_url,package}. This will then be replaced by the text that comes after the "=" sign - in this case it would be replaced by "Platinum".


How you use this module isn't limited to web forms though. You can use this module in many many ways - it's only limited to your imagination....

Support Material