(Added to the parent Tips and tricks category)
m (Auto Redirect Guests to Login moved to Auto redirect guests to login: de facto naming convention)
Suppose you have some menu choices that require a user to be logged in, like "Submit an Article". You would like all users to be able to see the restricted menu item, whether or not they are logged in.
If the user is logged in, they just go directly to the restricted menu item.
If the user is not logged in
If they are not registered, they have the option to register or navigate to another page.
Here is how you do this in Joomla!.
Now, when a guest (non-logged-in user) accesses the "Submit an Article" menu choice, it redirects them to the login page. If they log in successfully, they are taken to the desired page (in this case, "Submit an Article"). If there were already logged in, they go there directly.
In my case, I've added the following menu items: 1.HOME 2.BLOG (IDOBlog) 3.WIKI (A Wiki) 4.DIRECTORY (SOBI2) 5.CLASSIFIEDS (ads) 6.FAQS (Articles section) 7.SHOP (vitrue mart) 8.Contact US (contacts)
I wanted 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.
So, I created a "hidden menu" with the menu items for 3 - 7, using the restricted access level. Then, when I created the "real" menu, I used the menu type "Alias" for these items and set the "Menu Item" Parameter to the corresponding menu item in the "hidden menu".
As far as I know, this method is applicable to all menus in the menu manager. In case of any help or suggestion please contact me on forums.joomla.org my username is ziggy03. In case of a better or alternate method please feel free to edit this page. Thanks.