How to create link to login, logout, register page in Joomla?
It often happens that customers do not need a registration page, but after a while, there are additional opportunities at the site requires registration page, as well as the landing page. So, how to add these links to our Joomla template?
If we want to add a bit of user interactivity then we first need to get the users name with a JFactory call and store it in a variable which we place in the php section of the template:
$username =& JFactory::getUser();
Then we can use this to show Register, Login links or Logout link, it depends of user logged in or not.
If we want to add a bit of user interactivity then we first need to get the users name with a JFactory call and store it in a variable which we place in the php section of the template:?
Comments
If we want to add a bit of user interactivity then we first need to get the users name with a JFactory call and store it in a variable which we place in the php section of the template:?
Where di i find this
/templates/YourThemeName/index.php
< ? php $ username = & JFactory : : getUser ( ) ; ? >
(remove spaces)