Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Hide Front Page Items
Hide Front Page Items
Hide Front Page Items
Hey Stephen,
I am performing a check to see if the logged in user has selected their community id. If not, then I want to display a couple of modules for them to do so. It is working great, however, because the login returns the user to the Front Page, I am stuck with all of the modules that are displayed on the front page in addition to the notification that they have not selected a community id which then gets lost.
I want to have a blank page where the only thing that shows is this information. Any suggestions? I tried the instructions for disabling the modules that are found on the front page, but they still showed up. This is the code that I am using. Any help you can provide would be wonderful!
$user_id = $db->getEscaped((int)($user->id));
$app = &JFactory::getApplication();
if ($user_id > 0) {
$query = "select * from #__user_community where user_id = '$user_id';";
$db->setQuery( $query );
$row = $db->loadObject();
$community = $row->PleaseSelectYourCommunity;
}
if (MM_LOGGED_IN)
if ($community > 0)
$app->redirect("/georgia/community");
else
$changes->mod(430)->disable();
Re: Hide Front Page Items
Hi Sondra,
(1) it appears that even with MetaMod Pro, at this time you can't disable other modules on the page. I don't know why this is (not) happening, but I want to fix that for the next release. Sorry about this - that was always one of the key reasons for MetaMod Pro, to be able to alter modules even if they are in different module positions.
(2) until that's fixed, then the only way to create a page that doesn't have any modules on it is to NOT assign any modules to "All" pages - instead, either manually assign them to all pages except the page you're working on here, *or* put all your other modules into MetaMods, and get the MetaMods to assign them onto all pages except the target page.
I know, that's a bit messy.
One thing you can do to make it slightly less messy, is to append something to all the module position names for the modules. i.e. for every module assigned to "right", change that to "right-holder". Repeat for all your modules.
Then, create 1 MetaMod for each module position, and use a rule like:
if (... we're not on the target page...) return "right-holder";
So then, it's real easy to add new modules etc. Just treat "right-holder" like you treated "right", and the MetaMods will take care of all the rest.
Hope that helps,
Cheers,
Stephen
p.s. next week I am finally going to have some time to work on MetaMod, so I'll see if I can fix that bug.
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Hide Front Page Items
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7628
- Newest User:
- horlogekorting34
- Members Online:
- 0
- Guests Online:
- 90
- 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