-
AuthorPosts
-
December 7, 2010 at 8:03 am #157143
Hi,
Im running a non-profit site for a organization. And I have following question.
How do I change mainnav block into a module position but keep editing capibility from admin page.
I want to be able to change viewed mainnav menu based on menupoints just like an module.
Why; we have 15 differents departments in our organization who all need their own menu.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
December 17, 2010 at 8:57 am #367288you open the file: templatesja_socialblocksmainnav.php and find:
[PHP]
<?php $this->genBlockBegin ($block) ?>
<?php if (($jamenu = $this->loadMenu())) $jamenu->genMenu (); ?>
<?php $this->genBlockEnd ($block) ?><!– jdoc:include type=”menu” level=”0″ / –>
<?php if ($this->hasSubmenu() && ($jamenu = $this->loadMenu())) : ?>
<div id=”ja-subnav” class=”wrap”>
<div class=”main clearfix”>
<?php $jamenu->genMenu (1); ?>
<!– jdoc:include type=”menu” level=”1″ / –>
</div>
</div>
<?php endif;?>
[/PHP]replace:[PHP]
<?php $this->genBlockBegin ($block) ?>
<jdoc:include type=”modules” name=”ja-mainnav” />
<?php $this->genBlockEnd ($block) ?>[/PHP]
When done, the template has a new position, its name “ja-mainnav“, you put your module to that position.Thanks
carynh Friendcarynh
- Join date:
- January 2011
- Posts:
- 25
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
March 24, 2011 at 2:37 pm #383067This is cool, then how is the location of that module position controlled? Through the layout in the Joomla Admin?
I am asking because Methys seems to need this adjustment, too, in order to get control of mainnav, because there is no mainnav block in the default configuration.
Thanks!
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
March 25, 2011 at 7:29 am #383209in the layout file, add something like:
<block name="mnav" type="modules" >ja-mainnav</block>
that will add a new block with a position named “ja-mainnav” inside it.lebellegardien Friendlebellegardien
- Join date:
- October 2011
- Posts:
- 147
- Downloads:
- 0
- Uploads:
- 23
- Thanks:
- 3
June 23, 2012 at 6:51 am #458570and then how to put to the module the css style like the block had before ?
-
AuthorPosts
This topic contains 6 replies, has 5 voices, and was last updated by Saguaros 12 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum