Alex Basa
Alex Basa

Reputation: 25

Change joomla menu from source code

can I change the joomla menu from source code?

I want to test if I have an open session, and if I have it , I want to change the Login menu, into My Account menu !

Can anyone help me? Thanks.

Upvotes: 1

Views: 58

Answers (1)

Søren Beck Jensen
Søren Beck Jensen

Reputation: 1676

You need to make a template override of the menu.

https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core

Then inside that use:

$user = JFactory::getUser();
if ($user->guest())
{
    //Insert HTML if not logged in
}
else
{
    //Insert HTML if logged  in
}

Upvotes: 1

Related Questions