-
AuthorPosts
-
March 27, 2012 at 5:10 pm #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.
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
March 27, 2012 at 5:20 pm #445956WOW . . . 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)>
🙂
1 user says Thank You to TomC for this useful post
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
March 27, 2012 at 6:22 pm #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 Friendn6rej
- Join date:
- November 2006
- Posts:
- 1040
- Downloads:
- 0
- Uploads:
- 63
- Thanks:
- 79
- Thanked:
- 145 times in 90 posts
March 27, 2012 at 10:21 pm #446018you 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.
March 28, 2012 at 8:25 am #446079Here 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.com – http://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 Friendn6rej
- Join date:
- November 2006
- Posts:
- 1040
- Downloads:
- 0
- Uploads:
- 63
- Thanks:
- 79
- Thanked:
- 145 times in 90 posts
March 28, 2012 at 10:15 pm #446229and thats working?
March 28, 2012 at 11:10 pm #446232<em>@n6rej 310845 wrote:</em><blockquote>and thats working?</blockquote>
Yes, it is.n6rej Friendn6rej
- Join date:
- November 2006
- Posts:
- 1040
- Downloads:
- 0
- Uploads:
- 63
- Thanks:
- 79
- Thanked:
- 145 times in 90 posts
March 28, 2012 at 11:21 pm #446233hey thats great. Hopefully Tom will be able to make up a nice tutorial from that. Others have long asked for this.
AuthorPostsViewing 9 posts - 1 through 9 (of 9 total)This topic contains 9 replies, has 3 voices, and was last updated by n6rej 12 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Left and Right Megamenu
Viewing 9 posts - 1 through 9 (of 9 total)