T3 Community Discussion & Support

Let's build the best free Joomla template framework, together!
  1. jony
  2. General Discussion
  3. Sunday, December 15 2013, 04:45 PM
  4.  Subscribe via email
Hello!
How can I duplicate the main menu, just like annex file?
Attachments (1)
References
  1. http://www.adespcarnaval.com.br
  São Paulo, Brazil
Visit 
Comment
There are no comments made yet.
Accepted Answer
Admin Accepted Answer Pending Moderation
0
Votes
Undo
Hi jony,

I did not say that you must put the code inside the mainnav.php file.
But instead of create the same markup around the new code.
You can clone the mainnav.php file, change the content to to load the new menu.

Then you can modify layout files (tpls/default.php or tpls/home-1.php, ... the layout you are using) to load the new clone mainnav.php.

If you have problem, you can hire a developer to help you.

Regards
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # Permalink
Admin Accepted Answer Pending Moderation
0
Votes
Undo
Hi,

You can just add another call to mainnav.php block.

or for more detail, just duplicate

<div class="nav-collapse collapse<?php echo $this->getParam('navigation_collapse_showsub', 1) ? ' always-show' : '' ?>">
<?php if ($this->getParam('navigation_type') == 'megamenu') : ?>
<jdoc:include type="megamenu" />
<?php else : ?>
<jdoc:include type="modules" name="<?php $this->_p('mainnav') ?>" style="raw" />
<?php endif ?>
</div>


to another location, which you want o show.

Regards
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 1
jony Accepted Answer Pending Moderation
0
Votes
Undo
Thank you for your answer!
I was able to duplicate in mainbody-home-2.php, but not below slider-banner as I show to you in the first annex file. And the duplicate menu is the exatly copy of mainmenu, what I need is another menu with different content not a duplicate. I express badly my needs. What can I do?

have a nice day!
joao
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 2
Admin Accepted Answer Pending Moderation
0
Votes
Undo
Hi jony,

You can load 2 different megamenu.
Please check Ja Magz for reference.

Just add 2 new attritube 'name' and 'menutype' to <jdoc:include type="megamenu" /> as below

<div class="nav-collapse collapse<?php echo $this->getParam('navigation_collapse_showsub', 1) ? ' always-show' : '' ?>">

<?php if ($this->getParam('navigation_type') == 'megamenu') : ?>

<jdoc:include type="megamenu" menutype="[your-second-menutype]" name="[your-second-menutype]" />

<?php else : ?>

<jdoc:include type="modules" name="<?php $this->_p('newmenuposition') ?>" style="raw" />

<?php endif ?>

</div>


Regards
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 3
jony Accepted Answer Pending Moderation
0
Votes
Undo
Tks!

I check the reference and videos but I didn't see any reference about two megamenu in the same template. In Ja Magz I notice that my menu admin don't have the 'extended settings' as show in here http://www.joomlart.com/documentation/joomla-templates/ja-magz#menu-config and I think this is not the answer

1) I choose the mainbody-home-2.php to put insert those codes you provide: the 'name' and 'menutype' 'your-second-menutype' is the name of the new menu I created in admin right? I create a new menu in admin called "Topo".
2) So I put <jdoc:include type="megamenu" menutype="[Topo]" name="[Topo]" ></jdoc:include> is that right? And the 'newmenuposition' I put 'home-5' (because is below the slider-banner)
3) I also duplicate the template in order to have two megamenu (one original called 'Main Menu' and the new one called 'Topo'), One in 'mainnav position' and the new one in 'home-5 position'
4) the code I insert is this:

<div class="nav-collapse collapse<?php echo $this->getParam('navigation_collapse_showsub', 1) ? ' always-show' : '' ?>">
<?php if ($this->getParam('navigation_type') == 'megamenu') : ?>
<jdoc:include type="megamenu" menutype="[Topo]" name="[Topo]" ></jdoc:include>
<?php else : ?>
<jdoc:include type="modules" name="<?php $this->_p('home-5') ?>" style="raw" />
<?php endif ?>
</div>

After save this changes I got 500 - Unable to load renderer class... :(
I have to do changes in admin to?

have a nice day!
João
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 4
Admin Accepted Answer Pending Moderation
0
Votes
Undo
Hi jony,

On JA Magz, we provide extended setting because we can let user choose which menu type to assign to which possition.

If you only create your own template, you can use

<jdoc:include type="megamenu" menutype="mainmenu" name="mainmenu" />
for the normal megamenu
and

<jdoc:include type="megamenu" menutype="topo" name="topo" />
for new topo megamenu

Hope it helps
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 5
jony Accepted Answer Pending Moderation
0
Votes
Undo
I understand but when I insert this code you provide I still get error 500 - Unable to load renderer class. This is all my mainbody-home-2.php in blocks:

<?php
/**
* @package T3 Blank
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;
?>

<div class="home">
<?php if ($this->countModules('home-1')) : ?>
<!-- HOME SL 1 -->
<div class="wrap t3-sl t3-sl-1<?php $this->_c('home-1')?>">
<jdoc:include type="modules" name="<?php $this->_p('home-1') ?>" style="raw" />

</div>


<!-- //HOME SL 1 -->
<?php endif ?>

<?php $this->loadBlock ('mainbody') ?>

<?php if ($this->countModules('home-5')) : ?>
<!-- HOME SL 5 -->

<div class="wrap t3-sl t3-sl-5<?php $this->_c('home-5')?>">
<jdoc:include type="modules" name="<?php $this->_p('home-5') ?>" style="raw" />
</div>
<!-- //HOME SL 5 -->

<div class="nav-collapse collapse<?php echo $this->getParam('navigation_collapse_showsub', 1) ? ' always-show' : '' ?>">
<?php if ($this->getParam('navigation_type') == 'megamenu') : ?>
<jdoc:include type="megamenu" menutype="topo" name="topo" />
<?php else : ?>
<jdoc:include type="modules" name="<?php $this->_p('home-5') ?>" style="raw" />
<?php endif ?>
</div>
<?php endif ?>
</div>

I try "topo" and "Topo" - get error: 500
I delete all <div class="nav-collapse collapse"></div> - get error: 500
I change places in every order I could think of - get error: 500...

I don't know what to do, sorry to bother you...

have a nice day!
joao
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 6
Admin Accepted Answer Pending Moderation
0
Votes
Undo
Hi jony,

It seems you are using old verion of T3.
The latest version of T3 is v2.0.1 and available at https://github.com/t3framework/t3/releases

Though, you can use old version of T3 to do it.
<jdoc:include type="megamenu" menutype="topo" name="topo" />

turn it to

<?php echo $this->megamenu('topo') ?>

I hope you are not using an earlier of T3 v.1.4.0


Regards
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 7
jony Accepted Answer Pending Moderation
0
Votes
Undo
hello,
i update to the latest version of T3 v2.0.1.
I did the changes you told and the error 500 do not appears any more. But the new menu "topo" do not show as well. Check the annex file please.The website http://adespcarnaval.com.br is not online Login: adesp and Pass: p938r0ofwbqkahb



<?php
/**
* @package T3 Blank
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;
?>

<div class="home">
<?php if ($this->countModules('home-1')) : ?>
<!-- HOME SL 1 -->
<div class="wrap t3-sl t3-sl-1<?php $this->_c('home-1')?>">
<jdoc:include type="modules" name="<?php $this->_p('home-1') ?>" style="raw" />

</div>


<!-- //HOME SL 1 -->
<?php endif ?>

<?php $this->loadBlock ('mainbody') ?>

<?php if ($this->countModules('home-5')) : ?>
<!-- HOME SL 5 -->

<div class="wrap t3-sl t3-sl-5<?php $this->_c('home-5')?>">
<jdoc:include type="modules" name="<?php $this->_p('home-5') ?>" style="raw" />
</div>
<!-- //HOME SL 5 -->

<div class="nav-collapse collapse<?php echo $this->getParam('navigation_collapse_showsub', 1) ? ' always-show' : '' ?>">
<?php if ($this->getParam('navigation_type') == 'megamenu') : ?>
<?php echo $this->megamenu('topo') ?>
<?php else : ?>
<jdoc:include type="modules" name="<?php $this->_p('home-5') ?>" style="raw" />
<?php endif ?>
</div>
<?php endif ?>
</div>
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 8
Admin Accepted Answer Pending Moderation
0
Votes
Undo
Hi jony,

I checked your site and saw that the menu is showing.
But you need to put the correct markup to make it show beautiful as the main megamenu.

You need to check for the tpls/blocks/mainav.php file for the markup of megamenu.

Regards
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 9
jony Accepted Answer Pending Moderation
0
Votes
Undo
Tks for your answer!
I manage to show the SECOUND menu below the mainmenu, but what what i need is below the slideshow, see the annex file please.

This is the code in templates/t3_blank/tpls/blocks/mainav.php

<!-- MAIN NAVIGATION -->
<nav id="t3-mainnav" class="wrap t3-mainnav navbar-collapse-fixed-top">
<div class="container navbar">
<div class="navbar-inner">

<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-reorder"></i>
</button>

<div class="nav-collapse collapse<?php echo $this->getParam('navigation_collapse_showsub', 1) ? ' always-show' : '' ?>">
<?php if ($this->getParam('navigation_type') == 'megamenu') : ?>
<jdoc:include type="megamenu" ></jdoc:include>
<?php else : ?>
<jdoc:include type="modules" name="<?php $this->_p('mainnav') ?>" style="raw" />
<?php endif ?>

<!-- //HERE IS THE NEW CODE YOU PROVIDE -->

<div class="nav-collapse collapse<?php echo $this->getParam('navigation_collapse_showsub', 1) ? ' always-show' : '' ?>">
<?php if ($this->getParam('navigation_type') == 'megamenu') : ?>
<?php echo $this->megamenu('topo') ?>
<?php else : ?>
<jdoc:include type="modules" name="<?php $this->_p('home-5') ?>" style="raw" />
<?php endif ?>
</div>

<!-- //HERE IS THE NEW CODE YOU PROVIDE -->

</div>
</div>
</div>
</nav>

<!-- //MAIN NAVIGATION -->
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 10
jony Accepted Answer Pending Moderation
0
Votes
Undo
dude, we did it!
tks very much! The site is the way I need!
i m not a programmer and could do with your help!
tks for the patience!

have a nice day!

tks alot!
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 11
jony Accepted Answer Pending Moderation
0
Votes
Undo
hello!
There is an update for t3 in this website as you can see in the annexx file. If I update I gonna lose this double menu?

tks!
joao
Attachments (2)
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 12
Gardner Luna Accepted Answer Pending Moderation
0
Votes
Undo
Hi Jony,

Please take a full back-up when you upgrade. We suggest you to use JA Extension Manager to upgrade.

Check out the docs here: http://t3-framework.org/documentation/installation#upgrade

Gardner.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 13
Ashley Accepted Answer Pending Moderation
0
Votes
Undo
Hi

Yes there is a problem - I lost my second megamenu after upgrading to v2.1.5

I was using this code as first recommended by Wall Crusher of Joomlart Forum Post

<jdoc:include type="megamenu" name="the_menu_type" menutype="the_menu_type" ></jdoc:include>


If you are using this code as I was you will lose the menu content - the navbar loads but no menu items

If you use the following code
<?php echo $this->megamenu('the_menu_type') ?>

Then it will work as expected

Something in the v2.1.5 upgrade changed and caused the problem

I am not sure it was intentional or a bug

Best regards

Ashley in Spain
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 14
Gardner Luna Accepted Answer Pending Moderation
0
Votes
Undo
Hi guys,

Please check this docs: http://t3-framework.org/documentation/bs3-customization#multi-instance-megamenu

P/S: this docs is for T3 bs3 blank template.

Gardner.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 15
jony Accepted Answer Pending Moderation
0
Votes
Undo
tks guys!! a lot! i ll look in to it...
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 16
Gardner Luna Accepted Answer Pending Moderation
0
Votes
Undo
Yeah, please share your work after done ;)
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 17
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.