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: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience 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 bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.