Skip to main content
Share Your Experience: Take the 2024 Developer Survey
11 votes
Accepted

Change Login to Logout

The Good Folks at OSTraining just published this nice Tutorial: Step #1. Create the Login link Go to Menus > your menu > Add New Menu Item Enter a Menu Title. Select the Menu Item Type. Choose ...
Mikan's user avatar
  • 3,007
8 votes
Accepted

Get menu item by ID in Joomla 3

Not a big difference so far for what you are after... $mainframe = JFactory::getApplication(); $menu = $mainframe->getMenu(); // Use this if you want to get all menu items from a certain menu $...
FFrewin's user avatar
  • 19.7k
5 votes
Accepted

Joomla 3 - use article title as browser Page title with the menu item title

Here is the simple answer for you. <?php $menu = JSite::getMenu()->getActive(); //SET THE PAGE TITLE $doc= JFactory::getDocument(); $doc->setTitle($menu->title.' - '.$this->item-&...
Terry Carter's user avatar
  • 1,812
5 votes
Accepted

External link menu item with tell or callto

This should work just fine. You do however need to ensure you set the Menu Item Type to External URL. See the screenshots below:
Lodder's user avatar
  • 26.9k
5 votes
Accepted

How is the relationship between template styles and menus stored in Joomla 3.x?

template_style_id column in #__menu table.
Sharky's user avatar
  • 11.4k
5 votes
Accepted

Can Smart Search index menu items or custom modules?

To answer the question: The items indexed in the smart search are driven by the 'finder' plugins. Menu items and custom modules have no finder plugins, but you could write them. I don't know of any ...
jamesgarrett's user avatar
  • 3,299
4 votes
Accepted

List articles by author

There is another solution that you can use which doesn't require any installs or modifications. First create a new module of type: "Articles - Category". This type of module allows you to filter ...
cyberp's user avatar
  • 56
4 votes

How to make a menu item (menu link) invisible in a footer menu?

Login to your website administration site Go to Menus -> Your menus which has this menu item Click on the Unpublish button of the desired menu item If you do not want to unpublish and just want to ...
Nagarjun's user avatar
  • 3,001
3 votes
Accepted

K2: Call To A Member Function Get() On Null

I posted the issue on k2 forum and got the answer. Following is the issue's reason and solution: In Helix Framework, when we create a menu item of type item edit form. It throws an error. So, this is ...
Liz.'s user avatar
  • 1,385
3 votes

List articles by author

This is not provided by default from Joomla. You could either use a module, create your own model-view with a custom menu item, or use 3rd party content component or CCKs like k2. Joomla Content - ...
FFrewin's user avatar
  • 19.7k
3 votes
Accepted

How to detect whether the user is on a specific menu?

You can use the following to display the desired message: $app = JFactory::getApplication(); exist $menu = $app->getMenu(); $title = $menu->getActive()->title; echo 'Welcome to ' . $...
Lodder's user avatar
  • 26.9k
3 votes

Change Login to Logout

In Joomla! 3.5 we have a new menu item type called Logout in Users section, create a new menu item and select this new option, see the screenshot: Regards.
AlejandroVega's user avatar
3 votes
Accepted

How to add/remove menu item programmatically?

Assuming the menu option has a suitable CSS selector e.g. "item-135", it could be hidden via CSS. You could create a custom HTML module to add the appropriate code to the applicable page(s). Set the ...
Neil Robertson's user avatar
3 votes
Accepted

Menu item adding 'Clients/' to url

I had the same issue with the menu then I found this. https://forum.joomla.org/viewtopic.php?f=615&t=772029 It was helpful but not the solution. Then I checked my #__menu table and there I ...
Joomler's user avatar
  • 1,811
3 votes

Set Prefered Template with parent:display()?

You can force the template style like this: $templateStyleId = 3; // set here the template style id $app = JFactory::getApplication(); JTable::addIncludePath(JPATH_ADMINISTRATOR . '/...
Dennis Heiden's user avatar
3 votes
Accepted

Is there an event for saving a menu item?

onContentAfterSave() is the right one. It appears in com_menus, in the menu item model's save function: (administrator\components\com_menus\models\menu.php - line 240) // Trigger the after save ...
RichardB's user avatar
  • 3,082
3 votes

How to remove menu parent from url?

A "clean" way of addressing this problem from within the Joomla is to create the child menu item in a hidden menu, and then reference (in the real menu) the child menu item using a menu item of type "...
itoctopus's user avatar
  • 3,226
3 votes
Accepted

Hiding a Menu item with PHP in Sourcer in Joomla 3.8.1

It looks like you have a typo in your CSS. Your code section at the beginning is fine, but the screenshot at the end of your post is showing incorrect use of the !important rule. The semi colon ...
johanpw's user avatar
  • 13.3k
3 votes
Accepted

Some SimpleCRM menu items fail with error: Call to a member function getModel() on null

This question (problem) was successfully and quite quickly solved yesterday, working effectively together with @Mick on the solution. And this question is very well detailed, well described and it ...
Zollie's user avatar
  • 2,936
3 votes
Accepted

Creating a menu using php

For starters, perhaps just an oversight on bringing your code to the JSE platform here, but... $menuTable = JTable::getInstance('Menu', 'JTable', array()); You are passing in an empty array. $newMenu ...
Grant G's user avatar
  • 714
3 votes

Show 'menuitem' field name in frontend of module

You can use the following: $menu = Joomla\CMS\Factory::getApplication()->getMenu(); $menuItem = $menu->getItem($menulink); echo $menuItem->title; If you var_dump($menuItem);, it will show ...
Lodder's user avatar
  • 26.9k
2 votes

Get the number of menu elements? (Parents)

A more effective method to get all the menu items that are on the top level (level 1) and part of the menu called "mainmenu" (default menu): // Get default menu - JMenu object $menu = JFactory::...
Nick's user avatar
  • 51
2 votes

Working menu link now leads to 404 error page

Chiming in with another possible solution. I just ran into the same issue that was confounding me. I tried turning SEF URLs off, swapped the .htaccess / .hthacces.txt files, etc. All the recs you will ...
MrPotatoHead's user avatar
2 votes

Working menu link now leads to 404 error page

I was having the same issue when I redesigned a site for a client. I built the site on my server and transferred it to theirs. I couldn't figure out why this one alias (services) wouldn't work. If I ...
Jennifer's user avatar
2 votes

Page Display control missing on menu items

I had the same issue. Found an answer here: https://stackoverflow.com/questions/24417351/joomla-3-3-1-cant-edit-and-create-new-menus-in-menu-manager It seems after all, that the solution is just ...
mavrosxristoforos's user avatar
2 votes

Redirect to a menu item from controller

If you are in controller and have Itemid from component configuration, you can try this simple redirect: $this->redirect(JRoute::_('index.php?Itemid=' .JComponentHelper::getParams('...
Lanah's user avatar
  • 522
2 votes

Change Login to Logout

I had to do the same thing on one of my sites. Firstly, you should create a Template Override for the mod_login module Once done, you should have the following file: ROOT/templates/YOUR_TEMPLATE/...
Lodder's user avatar
  • 26.9k
2 votes
Accepted

How to create one page Joomla site?

Any template should work fine with "External URL" menu options linking to appropriate IDs on the page (see example below). You can also create extra IDs in the content where needed by ...
Neil Robertson's user avatar
2 votes
Accepted

How to add submenus to a menu?

Beez template doesnt support dropdown menu. You can use different templates also if the Beez template is important then you can install menu extension to work with the same template. Some free ...
Joomler's user avatar
  • 1,811
2 votes

Change Login to Logout

I made changes to the User Access Levels but these didnt appear to be working, I have since cleared my cache and now the website appears to be working how I wanted to. FOR USER ACCESS LEVELS: PUBLIC:...
Sam Potts's user avatar
  • 293

Only top scored, non community-wiki answers of a minimum length are eligible