Hello I am using this code:
<?php $active = JFactory::getApplication()->getMenu()->getActive(); echo $active->title; ?>
To show the current menu item title, but how can I make it linkable? So its a link and I can click it?
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.Sign up to join this community
To get the link, you can simply use
So based on your code, you can use the following:
$active = JFactory::getApplication()->getMenu()->getActive(); $title = $active->title; $url = JRoute::_($active->link); echo '<a href="' . $url . '">' . $title . '</a>';