I am trying to create a custom backend page in the same layout as Joomla. So none of the buttons have to work since I am going to be writing my own code, the only exception to that is the logout button.

How can I make the logout button work on a copied joomla backend page (in my example I copied the articles overview source code) and also make sure that when logged out this copied page is not accesible and shows the joomla login page?

I am using Joomla 3.

  • Can we see the work you have done so far? Context is a good thing.
    – mickmackusa
    Aug 1, 2019 at 14:58

1 Answer 1


The link below is a logout link to be used in your backend.

<a href="<?php echo JRoute::_('index.php?option=com_login&task=logout&' . JSession::getFormToken() . '=1'); ?>"><?php echo "Logout"; ?></a>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.