Auto redirect guests to login

From Joomla! Documentation

Revision as of 03:48, 22 July 2008 by Ziggy03 (Talk | contribs)

i'm a joomla newbie. But then to i've set a site using joomla 1.5. I had a question to ask about menu settings.

I've added 5-7 menu items with sub items in some of them. namely:


2.BLOG (IDOBlog)

3.WIKI (A Wiki)



6.FAQS (Articles section)

7.SHOP (vitrue mart)

8.Contact US (contacts)

Now i wanted to tweak it a bit. I want that ALL the menu items are viewable by public (non-registered users included) at the front end. BUT i want that menu items 3,4,5,6 & 7 are accesible by REGISTERED users only. In other words if anyone clicks on menu item 3/4/5/6/7 they'll be lead to the login modules.

This is how to do it:-

1. Create a new menu from menu manager, say it is named "hidden menu" added my menu items that i want to be accessible to registered users (viz. menu items 3,4,5,6 & 7). Set access levels of these menu to "registered" (or special if you want it to be applicable to special category)

2. Don't publish this menu from the module manager screen, keep it unpublish.

3. Go to the menu manager and create new menu again. Name it the way you want to say "main menu"

4. Then add menu items 1,2 which are supposed to be public.

5. Then add using the ALIAS menu type item add the items from "hidden menu".

6. Keep these 'ALIAS TYPE MENU ITEMS' accesible to public.

7. And then publish the "MAIN MENU" (or whatever you've named it) from the moudle manager using the position & order of your choice. AND Voila its all there.

8. If you want sub-menus make sure you've added them sub items to the ALIAS in the main menu and not the "hidden menu".

Now it redirects users to the login page if they click on any menu items excluding item 1,2 & 8, if they're not logged in.

*This method is applicable to all menus in the menu manager. In case of any help or suggestion please contact me on my username is ziggy03.

In case of a better or alternate method please feel free to edit this page. thanks ZIGGY 03