Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Hide module after login on some pages
Hide module after login on some pages
Hide module after login on some pages
I want to hide the some modules on home page after login but show these modules on other pages of the website.means like slider module hides on home page after login but show on other pages of the website
03-Jun-13 06:48:47
Re: Hide module after login on some pages
Hi Mithun,
Ok, I think you are wanting this:
- module shown on home page and some other selected pages for guests
- when user is logged in, module is to disappear from the home page, but remain on other pages.
Right?
Ok, here's how to do it:
1 - read the Quick Start guide: http://www.metamodpro.com/metamod/quick-start
2 - set up your "target" module: the one you want to appear/disappear on those pages. When you set it up, set it to appear on "menu items: none". We'll do the allocation of which pages to appear on, in the MetaMod setup.
3 - set up a new MetaMod and assign it to the front page and the other pages you want it to appear on.
In the MetaMod, use the following PHP:
if ($user->id == 0 or $Itemid != XXX) return YYY;
Replace XXX with the Itemid of your home page (i.e. the id of the menu item, which you can find in the menu manager next to the menu item for the home page).
Replace YYY with the module id of your target module.
Ensure that the MetaMod is published, set to a valid module position, and set to dsplay on the correct menu items.
Cheers,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Hide module after login on some pages
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7627
- Newest User:
- rudys68879
- Members Online:
- 0
- Guests Online:
- 161
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked