The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Thu Jun 26, 2008 2:33 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Wed Sep 13, 2006 7:38 pm
Posts: 28
I know how to make a module that is visible only to registered users. But is it possible to have a module that is not visible to registered users? For example, I'd like to have a module encouraging registration and it's benefits that shows for non-registered visitors, but that doesn't show for logged in members.

I'd also like to have a module that encourages users to register for access to a free download, but I'd like that module to be replaced by the module that offers the download once someone has logged in.

Any ideas?

???


Top
 Profile  
 
PostPosted: Thu Jun 26, 2008 9:17 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Aug 18, 2005 8:55 pm
Posts: 19645
Location: Nijmegen, The Netherlands
You can use the following workaround:

Create a Module Position in your template that is only visible for non registered users with some code like:
Code:
if ($my->id >0){
mosLoadModules('some_module_position', -1);
}

Assign the module (set level to "public") that should be visible to non-registered users (or for visitors that are not logged in) to the "some_module_position" module position.

_________________
Kind Regards,
Peter Martin, Global Moderator - Community Leadership Team
http://www.db8.nl - Joomla specialist, Nijmegen, Nederland
Joomla 2.5 multilanguage in 10 steps: http://www.db8.nl/en/joomla-presentatio ... ge-website


Top
 Profile  
 
PostPosted: Mon Mar 23, 2009 1:46 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Feb 19, 2007 10:13 pm
Posts: 4
Any way you can expand on that? I know how to create a new module position, but I have no idea where to put the code that you supplied. thanks.


Top
 Profile  
 
PostPosted: Tue Mar 24, 2009 7:34 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Jul 15, 2008 2:38 am
Posts: 9
Location: California
I have a related question - can a menu link show only to public (or guests) and be hidden for registered users?

_________________
SEO services http://www.sohoprospecting.com


Top
 Profile  
 
PostPosted: Wed Dec 30, 2009 8:34 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Tue Nov 27, 2007 2:28 am
Posts: 52
Now you can use nonumber.nl s fantastic Advaced Module Management to do this


Top
 Profile  
 
PostPosted: Wed Jan 19, 2011 10:24 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Jun 23, 2009 12:15 pm
Posts: 5
Is it also possible to do this for components?


Top
 Profile  
 
PostPosted: Thu Apr 07, 2011 2:00 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Nov 05, 2007 8:54 pm
Posts: 212
stevepops wrote:
Now you can use nonumber.nl s fantastic Advaced Module Management to do this


Thanks for this tip! A fantastic plugin I must say. For advanced users with a lot more options than I anticipate ever needing, but you never know...

I happened upon this searching for a solution to a fairly unique (I think) need, and it works like a charm and wasn't difficult to figure out at all. I have a demo site where I wanted public users to visit and at least be able to see menus that would normally (on the production sites) only be available to registered users, but on the demo some would work, and others not work. But I also needed a second menu that is fully functional (in the same module position as the "dummy" menus).

So I needed a full, but not fully functional menu for public users ONLY, and a second, duplicate and fully functional menu in the same place, identical in every way except actually functional, available to all registered users.

This plugin did the job.

I had another, more convoluted solution planned that involved creating a totally duplicated environment (duplicate articles and other features) that would, in effect, create a whole collection of "pages" for public users with certain features disabled, and a duplicate identical area where everything actually works, for registered users.

It would have worked, but even though it took me about an hour to fully understand how this plugin works, that was far less time than it would have taken to set up two completely different environments.

Awesome plugin! Thank you VERY much! :D

_________________
Don't let the number of stars fool ya! I spend most of my time in the "real world" working with and troubleshooting Joomla and the many extensions for it.


Top
 Profile  
 
PostPosted: Thu Mar 08, 2012 4:28 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Mar 08, 2012 4:23 pm
Posts: 32
I found this thread useful, but it took a few minutes to find the component refered to, so here's the link for anyone else interested:

http://extensions.joomla.org/extensions/style-a-design/modules-management/10307

I hope that's the right one anyway - worked for me!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 



Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group