Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • antonyw Friend
    #174182

    Hi there,

    I’m modifying the Purity II template and I’m trying to put the “mainnav” position in the header. Basically, what I want to accomplish is to put the menu in the header, on the right side of the logo. See this template:

    http://themeforest.net/item/sasu-black-premium-joomla-template/full_screen_preview/1259393

    According to FireBug, the “mainnav” position is inside the “header” 🙂 Please let me know how this can be done. Thanks!

    khoand Friend
    #439583

    You can’t do that. But I have a trick:
    – You login backend > extensions > template manager > ja_purity_ii > layout tab > edit default layout > remove the code


    <block name="mainnav" type="mainnav" main-inner="1"></block>

    – You create a new file, its name is /templates/ja_purity_ii/blocks/header.php with content is

    <?php
    /**
    # ------------------------------------------------------------------------
    # JA T3 System plugin for Joomla 1.7
    # ------------------------------------------------------------------------
    # Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
    # @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
    # Author: JoomlArt.com
    # Websites: http://www.joomlart.com - http://www.joomlancers.com.
    # ------------------------------------------------------------------------
    */
    ?>
    <?php
    $app = & JFactory::getApplication();
    $siteName = $app->getCfg('sitename');
    if ($this->getParam('logoType', 'image')=='image'): ?>
    <h1 class="logo">
    <a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $siteName; ?></span></a>
    </h1>
    <?php else:
    $logoText = (trim($this->getParam('logoText'))=='') ? $siteName : JText::_(trim($this->getParam('logoText')));
    $sloganText = JText::_(trim($this->getParam('sloganText'))); ?>
    <div class="logo-text">
    <h1><a href="index.php" title="<?php echo $siteName; ?>"><span><?php echo $logoText; ?></span></a></h1>
    <p class="site-slogan"><?php echo $sloganText;?></p>
    </div>
    <?php endif; ?>

    <?php if($this->countModules('search')) : ?>
    <div id="ja-search">
    <jdoc:include type="modules" name="search" />
    </div>
    <?php endif; ?>
    <?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;?>

    <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>

    antonyw Friend
    #440004

    Thanks for the response Khoand… I did exactly what you said but then the site gets messy. Please see the attached screenshots and advise. Probably it can be fixed with some CSS entries but I could find the correct one. I am waiting for your response. Thanks 🙂


    1. mainnav
    khoand Friend
    #440005

    Could you give me a link to your website? I will check it

    antonyw Friend
    #440009

    It was on localhost but I just uploaded it. This is a fresh installation (quickstarter) and I just changed what you said. Here it is:

    http://sitnyakovo.com/PURITY/

    Thank you very much for helping me out with this 🙂

    khoand Friend
    #440011

    You replace the code from /templates/ja_purity_ii/blocks/header.php

    <?php $this->genBlockBegin ($block) ?>
    <?php if (($jamenu = $this->loadMenu())) $jamenu->genMenu (); ?>
    <?php $this->genBlockEnd ($block) ?>

    with


    <?php if (($jamenu = $this->loadMenu())) $jamenu->genMenu (); ?>

    antonyw Friend
    #440012

    yes, it works 😀 😀 khoand, you are great man, just great.. thanks a million 😉

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

This topic contains 7 replies, has 2 voices, and was last updated by  antonyw 12 years, 8 months ago.

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