Using MetaMod to hide buttons from logged in users

Source: http://forum.joomla.org/viewtopic.php?f=431&t=401086&p=1693742#p1693742

It's been difficult to find an easy solution to hide menu items from registered users. Finally, I found a solution that works 100% for me using the MetaMod tool without using any template hacks. The instructions on the metamod page are very vague so I wanted to make it bit more in-depth for this specific use. I'd love to hear if this helps you. Let me know if you find any mistakes and I'll be sure to fix asap.

 

To hide buttons on your site for users that are logged in do the following:

First thing.. Install this --> http://www.brandonitconsulting.co.uk/mod_metamod/

**In this example I'm using Joomla 1.5.10 and the 'menu' module position.**

1. Create two menus, mine are named 'pubmenu' and 'regmenu'. (Assuming you already have a menu - easiest thing to do is make the new menu in menu manager for reg users. Next, go to the module mgr and create a new menu module for the regmenu menu, mine are called - 'pubmenu' and 'regmenu'. Edit your original menu module and select everything you want your registered users to see and then copy over to the newly created 'regmenu' module or what ever you called yours.) Make sure both menu modules are enabled.

2. Set the "Access Level" to 'public' and "Menu Items" to 'none' for both of your menu modules.

3. In the modules list, locate the one named metamod and copy it. (Only there if you installed the metamod module)

4. Edit newly copied metamod and rename it to metamod_pubmenu, set "Access Level" to 'public' and "Menu Items" to 'All'.

5. On right side in "Module Parameters" "Show Quick Modules To" choose - 'non-logged in users only' then scroll down to the list of available modules and find the "ID" number for your "pubmenu" item and then input that number in the "Quick Module ID Include" field.

6. Copy metamod_pubmenu, edit and rename it to metamod_regmenu. Then, on right side in "Module Parameters" "Show Quick Modules To" choose - 'Logged In Users Only' then input the ID number for your regmenu module in the "Quick Module ID Include" field.

Make sure everything you created is saved and published and all should work brilliantly. Remember that unpublished modules will not show up in the list of available modules while editing the metamod.


JonP - Webmaster
http://www.virtual-aviation.org

 

 


Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: The information on this website is provided without warranty and any content is merely the opinion of the author. Please try to test in development environments prior to adapting them to your production environments. The articles are written in good faith and, at the time of print, are working examples used in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

Related Articles

Joes Revolver Map

Joes Word Cloud

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin - Valid till 8 May 2022 3QnhmaBX7LQSRsC9hh6Je9rGQKEGNQNfPb
© 2021 Joel Lipman .com. All Rights Reserved.