Public, Guest, and Registered Access Levels in Joomla!
Understanding how to use the Public, Guest, and Registered access levels in Joomla! 3 sites with a frontend user area gives you much more control over your content and menus. For instance, if you have a login menu item, you really don’t need it once you are logged in, vice versus you don’t need a logout menu item if you aren’t logged in. Or, maybe you are asking people to sign up as a member in a module, you don’t need that same module showing after they have signed in.
Let’s take a look at how to use Guest and Public access levels to do just these type actions.
Public is used when you want your content to show to both logged in and not logged in users, but Guest is only visible when the user is NOT logged in.
First, out of the box Joomla! 3 is set to have Guest and Public setup, but before you try these steps, best to make sure your site is still setup properly for them to work.
- Click Users > Access Levels
- Verify you have Public and Guest access levels
- Click Users > Manage
- Click Options in the upper right
- Verify that in the Global Configuration options your New User Group is Registered and your Guest User Group is Guest
Please note, that these can be set to different ACLs depending upon your site setup. In this case, if you are following the steps in this tutorial you’ll need to adjust your registered and guest to match your specific setup for it to work properly.
First let’s setup a menu item that will only be seen when the visitor is not logged in to the site.
- Go to the menu you wish to add your new item on
- Click New to create the menu item
- Select the menu type to be a user login form
- Then change the access level to Guest
Next, let’s also setup a module that will only be seen when the visitor is not logged in to the site.
- Click Extensions > Modules
- Select New to create a new Module
- Select Custom HTML for the type (this could be any type of module, we are simply picking this for our example)
- After putting some content in and selecting position, change the access level to guest
Now go to the frontend of the site and take a look, you should see both the menu item and the module.
Next we need to make a user that is Registered level if you don’t have one already to test with.
- Click Users > Manage >Add New User
- Setup a new user as normal, making sure they belong to the Registered group
- Save and Close the user
- Go to the frontend of the website and login, either using the Login menu item you made, or a login module if you have one on your site
Once you are logged into the frontend of the site, you verify that the menu and module that are set to Guest access level are no longer visible.
Now, in our example we do have a login module that has a logout, but that might not be the case on your site. So let’s add a Logout menu item that will show in the same place that the Login menu item did, so it’s easy for the user to find.
- Go back to the same menu you put the Login menu item on and click to make a new menu item
- Select the menu type User > Logout
- Select Registered as the Access Level
- Go back to the frontend of your site, make sure you are still logged in, or log in. Then you will see the Logout menu item.
Learning how to use the Public, Guest, and Registered access levels give you a lot of power on who sees what content on your site. This knowledge should also help you as you get more complex with more levels past the Registered level for logged in users.
Interested in learning more about Joomla? Check out our many courses about Joomla and Joomla-related topics.
Fine explanation of Guest
/K.E.Klode
Thanks! Glad you found it a good explanation. Please let us know if there are other topics you would like to see covered.
Best tutorial information
Thanks! So glad you found it helpful!