Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • progoncenter Friend
    #175467

    Hi Joomlart community. Thank devs for so great thing as JAT3.
    For now i have one question:
    How can i show two copies of megamenu (left-megamenu and right-megamenu)
    See image.

    Ujeen.


    1. 4
    TomC Moderator
    #445956

    WOW . . . this is the first time I have seen an idea such as this – VERY COOL and innovative idea !!!

    Off the top of my head, I am not certain how to accomplish this – though I AM certain it CAN be accomplished. I will give it some thought – but this will remain open to ANYONE who might already know how this can be achieved. (If I can’t figure it out, I too will be looking forward to seeing what a potential set up for this might be)>

    🙂

    progoncenter Friend
    #445960

    TomC, thank you for answer.
    After posting this topik i found this thread. I will try to implement what i want trough these tips and will post my result here.

    TomC Moderator
    #445973

    <em>@progoncenter 310504 wrote:</em><blockquote>TomC, thank you for answer.
    After posting this topik i found this thread. I will try to implement what i want trough these tips and will post my result here.</blockquote>
    Yah, I new about that kind of set up …. it’s your “side-by-side” idea within the same layout block area that intrigues me.

    n6rej Friend
    #446018

    you can’t do it with exactly the same block. You CAN do it if you have two blocks same type in the same div container I believe. There is coding in megamenu block that makes it unique so this would need to be changed for each menu.

    progoncenter Friend
    #446079

    Here how i achive this
    In default.xml we have line
    [PHP]<block name=”mainnav” type=”mainnav”></block>[/PHP]
    In mainnav.php
    [PHP]<?php
    /**
    * ————————————————————————
    * JA T3 System Plugin for Joomla 2.5
    * ————————————————————————
    * Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
    * @license – GNU/GPL, http://www.gnu.org/licenses/gpl.html
    * Author: J.O.O.M Solutions Co., Ltd
    * Websites: http://www.joomlart.comhttp://www.joomlancers.com
    * ————————————————————————
    */

    // No direct access
    defined(‘_JEXEC’) or die;
    ?>

    <?php
    //left navigation – leftmain
    $topmenu = null;
    $topparams = new JParameter(”);
    /* Set the menutype */
    $topparams->set( ‘menutype’, ‘leftmain’ );

    $topparams->set( ‘menu_images_align’, ‘left’ );
    $topparams->set(‘menu_title’, 0);
    $topparams->set(‘menuname’, ‘ja-leftmega’); //to generate id for this menu

    //$topmenu = $this->loadMenu($topparams, ‘mega’);
    $file = T3_CORE.DS.’menu’.DS.”mega.class.php”;
    if (!is_file ($file)) return null;
    require_once ($file);
    $menuclass = “JAMenumega”;
    $topmenu = new $menuclass ($topparams);
    //assign template object
    $topmenu->_tmpl = $this;
    //load menu
    $topmenu->loadMenu();
    //check css/js file
    $this->addCSS (‘css/menu/mega.css’);
    $this->addJS (‘js/menu/mega.js’);
    ?>

    <div id=”ja-leftnav” class=”clearfix”>
    <?php if (($topmenu)) $topmenu->genMenu (); ?>
    </div>

    <?php
    //right navigation – rightmain
    $topmenu = null;
    $topparams = new JParameter(”);
    /* Set the menutype */
    $topparams->set( ‘menutype’, ‘rightmain’ );

    $topparams->set( ‘menu_images_align’, ‘left’ );
    $topparams->set(‘menu_title’, 0);
    $topparams->set(‘menuname’, ‘ja-rightmega’); //to generate id for this menu

    //$topmenu = $this->loadMenu($topparams, ‘mega’);
    $file = T3_CORE.DS.’menu’.DS.”mega.class.php”;
    if (!is_file ($file)) return null;
    require_once ($file);
    $menuclass = “JAMenumega”;
    $topmenu = new $menuclass ($topparams);
    //assign template object
    $topmenu->_tmpl = $this;
    //load menu
    $topmenu->loadMenu();
    //check css/js file
    $this->addCSS (‘css/menu/mega.css’);
    $this->addJS (‘js/menu/mega.js’);
    ?>

    <div id=”ja-rightnav” class=”clearfix”>
    <?php if (($topmenu)) $topmenu->genMenu (); ?>
    </div>

    <ul class=”no-display”>
    <li><a href=”<?php echo $this->getCurrentURL();?>#ja-content” title=”<?php echo JText::_(“SKIP_TO_CONTENT”);?>”><?php echo JText::_(“SKIP_TO_CONTENT”);?></a></li>
    </ul>
    [/PHP]

    This code will generate html:<div class=”wrap ” id=”ja-mainnav”>
    <div class=”main clearfix”>
    <div class=”clearfix” id=”ja-leftnav”>
    <div id=”ja-leftmega” class=”ja-megamenu clearfix”>
    </div> <script type=”text/javascript”>
    var megamenu = new jaMegaMenuMoo (‘ja-leftmega’, {
    ‘bgopacity’: 0,
    ‘delayHide’: 300,
    ‘slide’ : 1,
    ‘fading’ : 0,
    ‘direction’: ‘down’,
    ‘action’ : ‘mouseover’,
    ‘tips’ : false,
    ‘duration’ : 300,
    ‘hidestyle’: ‘fastwhenshow’
    });
    </script>
    </div>

    <div class=”clearfix” id=”ja-rightnav”>
    <div id=”ja-rightmega” class=”ja-megamenu clearfix”>

    </div> <script type=”text/javascript”>
    var megamenu = new jaMegaMenuMoo (‘ja-rightmega’, {
    ‘bgopacity’: 0,
    ‘delayHide’: 300,
    ‘slide’ : 1,
    ‘fading’ : 0,
    ‘direction’: ‘down’,
    ‘action’ : ‘mouseover’,
    ‘tips’ : false,
    ‘duration’ : 300,
    ‘hidestyle’: ‘fastwhenshow’
    });
    </script>
    </div>

    <ul class=”no-display”>
    <li><a title=”Skip to content” href=”#ja-content”>Skip to content</a></li>
    </ul> </div>
    </div>

    In menu manager i have to menus – rightmain and leftmain.

    That`s all.

    n6rej Friend
    #446229

    and thats working?

    progoncenter Friend
    #446232

    <em>@n6rej 310845 wrote:</em><blockquote>and thats working?</blockquote>
    Yes, it is.

    n6rej Friend
    #446233

    hey thats great. Hopefully Tom will be able to make up a nice tutorial from that. Others have long asked for this.

Viewing 9 posts - 1 through 9 (of 9 total)

This topic contains 9 replies, has 3 voices, and was last updated by  n6rej 12 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum