How to get specific menu items from joomla?

后端 未结 9 1990
孤独总比滥情好
孤独总比滥情好 2020-12-08 21:51

This question is bit specific for Joomla.

I have a main menu consisting of:

Home|About US|Privacy Policy|Portfolio|Contacts US.

Each menu it

相关标签:
9条回答
  • 2020-12-08 22:03

    Isn't it easier to create a new menu containing two aliases to the menus you want then load them anywhere on the website using {loadposition} or whatever?

    0 讨论(0)
  • 2020-12-08 22:04
    <?php
    
    $menuitemid = JRequest::getInt( 'Itemid' );
    if ($menuitemid)
    {
        $menu = JSite::getMenu();
        $menuparams = $menu->getParams( $menuitemid );
        $params->merge( $menuparams );
    }
    
    $propvalue= $params->get('property_name');
    
    ?>
    
    0 讨论(0)
  • 2020-12-08 22:14

    I think you should create a new menu in joomla then make aliases type of menu items, you should do this to make sure you don't get duplicate content issues. I think Alex answer is ok if you want to do it with code but its harder to maintain and for someone to understand who comes along. As it is a menu item it doesn't belong in a component or module in my opinion.

    0 讨论(0)
提交回复
热议问题