Skip to main content

Joomla Configuration

The "Logout" menu item

If your visitors have the option of logging in to your Joomla website, chances are you are using the login module. It is also possible to create a menu item with a link to the login form. Of course, you want to hide the "login" button and show a "logout" menu item to users who are already logged in. In this blog, I'll explain how to quickly set this up in Joomla 3.5 and above.

The "login" menu item

To start, you create a menu item to let visitors log in to your website.

uitloggen login

You choose the menu item type "Login form" and choose "Guest" under Access.

Changing Access to Guest will hide this menu item from logged-in users.

The "Logout" menu item for registered visitors

Since the "log in" menu item is no longer visible to logged-in users, you also need to create a menu item to log out.

uitloggen logout

You choose the menu item type "Logout" and choose "Registered" under Access.

Changing Access to Registered ensures that this menu item is only shown to logged-in users.

Note: The menu item "logout" does not refer to a form or page, but ensures that a user is immediately logged out when he clicks this button.

Error message: "You are not authorised to view this page." fix

As you can see, you get an error message after logging in: "You are not authorised to view this page" ( or in English "You are not authorised to view this resource." ).

You get the message because the login page can no longer be viewed by registered users.

To solve this, you need the menu item ID of your homepage. In my case, this is ID 101

uitloggen menu items

Go back to the menu item "Login" and choose the 2nd tab "Options"

Under Login reference, enter the link: index.php?Itemid=101 (Replace the number 101 with your own menu item ID)

uitloggen menu item inlogverwijzing

Do you need help setting up the menu on your own website?

Jeroen Moolenschot

About Jeroen

I have been working with the Joomla! CMS since 2006. Besides building and maintaining Joomla! websites and webshops, I am also familiar with search engine optimization (SEO), Joomla hosting and developing templates and extensions. Furthermore, I am a frequent visitor and speaker at JoomlaDays and various Joomla user groups.

I am committed to the Joomla! community as a member of the Extensions Directory team and the organization of Joomla user group Breda and JoomlaDagen Netherlands. In short: Are you looking for a Joomla Specialist, you should contact me!

Popular articles

Redirecting an old URL to a new URL in Joomla

Sometimes, some of your valuable links may lead to the 404 page. This usually happens when the alia…

Disable Joomla Update Notification email

Joomla has a plugin by default that emails every administrator with superuser privileges when a Joo…

Preventing spam in Joomla with Captcha

Nothing is more annoying than a mailbox full of spam responses or fake requests via your contact fo…

Accessibility in Joomla

Websites have become an important resource in our lives in recent years. It is therefore important…

Blocking an IP address on your Joomla website

It is, of course, possible to deny a particular IP address access to your Joomla website. Reason…

Hiding a menu item

In some cases, it is desirable to link to another article. This is not always possible without affe…