Recent News

Please note that we are in the process of moving Geomla to a brand new website with a brand new version - Geomla 2.0. Find out more at Geomla.com ...


Main Overview
Geomla Usage PDF Print E-mail

Overview | Tutorial 1, 2, 3, 4 | Usage Examples - Menus, Auto Redirection

Don't already own a copy of Geomla for Joomla! 1.5? Get it here...


Menu Example

Using the Geomla module to show different menus depending on your visitors country of origin

I've been asked a few times 'How do I show a different menu depending on where my users are visiting from?'.
You may wish to hide certain menu items for a particular country, or present them in different languages without using a translation extension.
Here's an example of how to do it using Geomla ...

This is basically achieved by copying your original menu (or creating an entirely new one if you prefer) and targeting the different menu modules using the Geomla module.
In this example, we are creating a new Main Menu to target to a particluar country, and using our original Main Menu as a default to show to the 'rest of the world'.

Step 1 - Copy your menu
You will have to create a second menu and menu module in menu manager. If you just want some slight differences between the menus you target, then the quickest way is to copy your current menu:

Go to Menus->Menu Manager and select your main menu.
Click 'Copy' and give it a new menu name (e.g. 'New Menu'), and a new module name (e.g. 'New Menu Module').
Next, go to Menus->New Menu and make any changes you want your other menu to have.
This should create your new menu and create a module for it.

Step 2 - Set up the Geomla component items
Now go to Components->Geomla->Geomla Module Content and click 'New'.
Give it a name (e.g. 'Geo Main Menu') and click 'select' next to 'Default Module'. (Note: Due to a minor bug you may have to click 'go' to display all the modules - this will be fixed in the next version)
Select your 'Main Menu' module from the list (this is your original menu module and will be targeted to the rest of the world).
Now find the country you wish to target in the list of countries and click 'select' next to it in the middle column. This time choose the 'New Main Menu' module.
Do the same for any other countries you want this other menu to appear.

Step 3 - Create the Geomla Module
Lastly, go to Extensions->Module Manager and create a new Geomla module.
In the 'Select Geomla Module Content' parameter, select the Geomla Content you just created.
Give the module a name (e.g. Geomla Main Menu) and set 'show title' to 'no' and 'enabled' to 'yes'.
Position it using the 'position' and 'menu assignment' parameters. Hit 'save'.
Now you must 'disable' the Main Menu and the New Main Menu module's, because if you don't they will all be displayed at the same time.
You may have to match the settings for the two 'mod_mainmenu' modules, as this won't have been done automatically when copying in the first step.
Also, you will have to reassign any other existing Joomla! modules so that they point to both menu's in the 'menu assignment' parameters for all of your Joomla! modules - hopefully you haven't got too many modules on your site.

This should now work and target the correct menu for the targeted country.

We are hoping that the next version of Geomla will make this process a lot simpler, stay tuned ...



 

Comments  

 
+1 #1 did not workedpriya 2009-12-17 04:45
The auto redirection did not worked when i followed your steps

i did all the same as explained here in the steps
can you please explain where i must be missing
Quote
 
 
0 #2 Angelcoding Replysteve 2009-12-17 13:28
@priya
I'm sorry you are having problems.

I can't help you without knowing exactly what code you have in place and how you've set everything up.

Can you please contact support by using the support menu link at the top of this page with as much information about your problem as possible and a url link to the page you are trying to redirect.
Note: If you are using Geomla on a localhost setup, this might be causing the problem.
Quote
 

Add comment


Security code
Refresh

Like it? Share it!

Partner Links