This tutorial is based on Joomla 2.5, and Hotspots Version 2.0.5. Also, the SEO Settings are:
Search Engine Friendly URLs: Yes
Use URL rewriting: Yes
Adds Suffix to URL: Yes
Unicode Aliases: No
For the
first part of this tutorial we will use part of the tutorial located at:
http://www.ostraining.com/blog/joomla/how-to-link-from-one-joomla-article-to-another-using-hidden-menu/
First you need to attach the component (hotspot) to a menu, but you don't wanna show the map attached to an active menu. Then we need to create a new menu, and hide it.
How to hide a menu in joomla?
- Go to Menus/Menu Manager
- Select New
- Fill the information appropriately. Something like:
Unique name: hiddenmenu
Title: Hidden Menu
Description: this menu contains my links
Module Title: myHiddenMenu
- Save that menu
- Go to Menus and select Hidden Menu
- Select New
- Select Hotspots/Map View
- Fill the title and the Alias. Something like:
Title: My Maps
Alias: mymaps
We had the whole hotspots component working in our site, but nobody can see it because there is no link to the map.
The Second Part:
Go to the article where you wanna include your map, select the line where you wanna show the map, and insert the following code:
<iframe src="http://YOUR_WEBSITE_ADDRESS/mymaps/?tmpl=component#!CATEGORY_ID" scrolling="no" width="100%" height="500px" frameborder="0"></iframe>
and replace:
YOUR_WEBSITE_ADDRESS with your actual website address
CATEGORY_ID with the id of the category you wanna show on that map
Tips:
1) Make the height 100 pixels bigger than the height of the map of hotspot component (Components/Hotspots/Layout/Height of the map div)
2) Note that after
YOUR_WEBSITE_ADDRESS you have to add the Alias you used when you created the hidden map.
3) To know the category ID number, go to
http://YOUR_WEBSITE_ADDRESS/mymaps
and click on the category markers on top of the map, check the address bar, and the number will be at the end of the line. (
NOTE: YOU WILL SEE THIS PAGE ONLY TYPING THE ABOVE LINK BECAUSE IT'S NOT ATTACHED TO ANY VISIBLE MENU FROM YOUR WEBSITE)
You can see the final result here:
http://www.vbct.ca/restaurants