Joomla · Joomla 1.6 · Joomla 1.7 · Joomla Modules · Joomla Setup · Joomla Tutorials · Wordpress

Joomla 1.7 – 5 Easy Steps to Create Guest Only Access to Menus and Modules

Joomla 1.7 Tutorial:  How to Display Modules for Guests only and Hide Once Logged In

By default Registered users on your Joomla website can see all modules and menus that are assigned to the Access Level of Public and Registered.   So it becomes a little tricky if you want to show a subset of modules or menus to only registered users and a different subset to non registered users.   Below I will show you how to do this.  High level of what needs to be done:

For example I want a new user group named “Guest” which is equivalent to the non registered users on my site to see x modules and x menus.  The steps are below:

1. Create a New User Group in User Manager

Joomla 1.7 - Create a New User Group in User Manager
Joomla 1.7 - Create a New User Group in User Manager

You will need to create a new user group since Public Group is the parent group to Registered.  Registered users will see Registered+ Public.  If you create a new user group under Public, Registered users will not see it.

  • Login to your Joomla 1.7 Administrator panel
  • Click on Users, Groups, Add New Group
  • Under User Group Details, enter the follow values:
      • Group Title = Guest
      • Group Parent = Public
  • Click on Save & Close

2.  Create a New Access Group in User Manager

Joomla 1.7 - Create a New Access Group in User Manager
Joomla 1.7 - Create a New Access Group in User Manager

The new Guest user group will need to have it’s own ACL so you can assign modules and menus to it.  This ACL will only have access to itself.

  • Click on Users, Access Levels, Add New Access Level
  • In Level Details, enter in the follow values:
      • Level Title = Guest
  • Under User Groups Having Viewing Access, Select only the following:
      • Use the checkbox to select = Guest
  • Click on Save & Close

3.  Edit the Public Access Group in User Manager

Joomla 1.7 - Edit the Public Access Group in User Manager
Joomla 1.7 - Edit the Public Access Group in User Manager

Since your Joomla website has been created with many modules and menus already that have Public as the assigned access, you must now allow the Guest group to view all modules and menus with access to Public.

  • Click on Users, Access Levels
  • Click and edit the Public ACL
  • Under the User Groups Having Viewing Access, also use the check to select:
      • Guest
  • Click on Save & Close

4. Edit User Manager Options

Joomla 1.7 - Edit User Manager Options
Joomla 1.7 - Edit User Manager Options

Now in the user manager there is a group defined just for non registered users and you must change this to the new group you created in step 1.

  • Click on Users, User Manager
  • Click on the Options button on the right side
  • In the Users Configuration, select the Component tab and set the following values:
      • Guest User Group = Guest
  • Click on Save & Close

 

5.  Change Access Levels in Menus and Modules in Module Manager

Joomla 1.7 - Change Access Levels in Menus and Modules in Module Manager
Joomla 1.7 - Change Access Levels in Menus and Modules in Module Manager

Now you can go to your Extensions Module Manager and configure your modules as required.  Select the modules that you want to be visible to guests only and change the access to Guest.  Menus are also configured in the Module manager so you can do the same with the Menus.  For example I will change the access for “Who’s Online” to be visible only by Guests/Non registered users:

  •  Click on Extensions, Module Manager
  • Search for and edit “Who’s Online”
  • Under Details, set the following value:
      • Access = Guest
  • Click on Save & Close

So that’s all that is required to prevent your registered users from seeing modules that are for Guests only, but you will also need to go through all existing modules on your Joomla website that you want this applied to.  Repeat step 5 for all modules you want to be displayed to Guests only.

Thanks,

Elaine

11 thoughts on “Joomla 1.7 – 5 Easy Steps to Create Guest Only Access to Menus and Modules

  1. I have a related challenge in that I have a separate Guest and Member user groups and I want to maintain a separate set of three menus for Public, Guest (registered), and Member (registered and paid) visitors. I would like all three menus to display to all three groups so its clear what you get if you register and eventually become a member. I setup each User Group and Category with their respective nested access control level (e.g., Public > Guest > Member) as well as assign an access level to each article within the category using the batch processing. From there, I set the three menus, menu items, and modules to the Public level so they are always visible. This seems to work fine for unauthorized access to single article links where I get “You are not authorised to view this resource.” message however, if I am linking to a component like a category blog, I get the dreaded “#404 Category not found” error message. If I go back and set the Categories to be public, I can avoid the #404 error, but the content is blank when I would prefer the “You are not authorised to view this resource.” or some other redirect. Seems like showing restricted menu options to promote registration/membership yet be able to gracefully handle when clicked would be a common use case. Is there a better way to do this? Thanks for hosting a very helpful site!

  2. Thank you very much! Excelent, and people in Joomla forum talking about making a “hack” on the code.
    You rock broh!

  3. Thank you! Excellent tutorial and very easy to follow, used this method to create a login / logout link combo to show the proper link whether a user is logged in or not. Great job!

  4. Thanks buddy worked like charm .. i tried every thing but nothing worked … n this was most convenient way to do my job .. hats off

  5. Hi Elaine!
    I came across your post because it’s not clear to me a why have a Guest Only Access.
    I understand one uses it when wants a guest user see things differently from a registered user, for example. So, I understand Guest Only Access also requires a generel login (guest) and password (****), OK?
    Is this the concept used when there’s a demo site, for example?
    Sorry if this sounds stupid, but it’s really NOT clear to me.
    Thank you if you can clarify this for me.
    All the best!

Leave a Reply to fuxo Cancel reply

Your email address will not be published. Required fields are marked *

Captcha Captcha Reload