HD-ModURL module for Joomla 2.5
Don't have your modules cooped up in Menu Items.
Use HD-ModURL to add free range HTML to any URL on your Joomla site.
What is this?
HD-ModURL is a module that outputs HTML to a Joomla page depending on the URL rather than the menu item. It is ideal for adding text, images or other HTML code to a single page that shares the same menu item as various other pages (eg. Blog pages, Virtuemart product pages or other components).
Sometimes you don’t want to apply a module to a menu item, you want to apply it to a specific URL.
HD-ModURL checks the URL of the page that it is applied to and will only render your HTML if it matches the URL that has been specified.
Therefore many different instances of HD-ModURL can be applied to the same menu item but only the ones that match the correct URL will be displayed.
It grabs the URL of the current page and if it matches up with the one that you have specified it will output your custom HTML. It does not require the domain of the URL to operate and works with or without SEF enabled pages.
You can also specify that it displays on all URLs that contain a specific element in its path. For example, with the following URL's...
...the element -story occurs on the 1st and 2nd URL; The element third occurs on the 3rd URL; and the element /blog/ occurs on all three URLs.
Install the zip file via the administration install manager as per any other module. Once it has installed go to the module manager and select HD-ModURL. Enable the module, select the module position and then either select the menu item you wish it to appear on or leave it set to "All" (either way, it will only display on your chosen URL).
Enter the target URL in the first URL box. This does not require the domain name therefore http://www.example.com/blog/01-first-story would only require /blog/01-first-story (don't forget the opening slash).
If you wish to target an element of the URL then change "Use element instead" to Yes then enter the target element in the "Element of URL" box.
Finally enter your HTML in the bottom box and click on save or apply.
One of the first things that all beginners have to get their heads round when they start building Joomla sites is the use of the menu manager, specifically how we depend on it to generate the URLs that enables us to view the live webpage. No matter how many articles you publish they have to be linked to at least one menu item in order to appear on the live site; and if you want to add a module to that page it also has to be applied to the same menu item.
In the case of the menu item type known as the article layout this is straightforward enough, allowing you to link one menu item to a single article to create a webpage. So far so good.
1 menu item + 1 article = 1 webpage
However with other types of menu items you lose that same level of control. With the menu item type known as the Category Blog layout for example, a whole section/category of articles is allocated to the same single menu item. Each webpage that is generated is now part of a collective, your previous ability to apply a unique Custom HTML module to an individual page has now been lost.
1 category/section + 1 menu item = Potentially hundreds of webpages
The same problem occurs with components (such as K2, Zoo or Virtuemart) which also require a single menu item to create many different webpages.
1 component menu item = Potentially thousands of webpages
So, If a client wanted you to do something as simple as adding a module to a specific blog entry (without it appearing on all the other blog entries) or applying a different style to a single Virtuemart product page (without it changing the style of all product pages) you would have a problem.
The problem is you don’t want to apply a module to a menu item, you want to apply it to an URL.
HD-ModURL is similar to the Custom HTML module but it checks the URL of the page that it is applied to and will only render if it matches the URL that has been specified, therefore many different instances of HD-ModURL can be applied to the same menu item and only the ones that match the correct URL will be displayed.