3

I have a site where I need to display a module based on the URL which the user has typed into their browser.

If the user types in thisdomain.co.uk they will be redirected to thenewdomain.co.uk/camps where I want a pop up/lightbox to be shown.

If they land directly on thenewdomain.co.uk/camps the pop up should not be shown.

Can this be done through jQuery or PHP and how can I load the module based on this?

2

You should be able to do it with Nonumber's Advanced Module Manager Pro version, as it allows adding custom PHP to determine if a module will be loaded or not:

http://www.nonumber.nl/extensions/advancedmodulemanager/userguide#4_Assignment-options

In that PHP check, you'd use $_SERVER['HTTP_REFERER'];. You have an example that involves that variable here:

https://stackoverflow.com/questions/12948109/return-to-previous-page-in-joomla

More info about that variable here:

http://php.net/manual/en/reserved.variables.server.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.