Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • Robert Friend
    #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 Moderator
    #367288

    you 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 Friend
    #383067

    This 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 Moderator
    #383209

    in 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 Friend
    #458570

    and then how to put to the module the css style like the block had before ?

    Saguaros Moderator
    #458816

    Hi lebellegardien,

    You could use module class suffix and add css style for that module.

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

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