-
AuthorPosts
-
antonyw Friend
antonyw
- Join date:
- February 2012
- Posts:
- 21
- Downloads:
- 0
- Uploads:
- 12
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
February 22, 2012 at 7:29 pm #174182Hi 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 Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
February 23, 2012 at 5:22 am #439583You 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 Friendantonyw
- Join date:
- February 2012
- Posts:
- 21
- Downloads:
- 0
- Uploads:
- 12
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
February 25, 2012 at 5:57 pm #440004Thanks 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 🙂
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
antonyw Friendantonyw
- Join date:
- February 2012
- Posts:
- 21
- Downloads:
- 0
- Uploads:
- 12
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
February 25, 2012 at 6:27 pm #440009It was on localhost but I just uploaded it. This is a fresh installation (quickstarter) and I just changed what you said. Here it is:
Thank you very much for helping me out with this 🙂
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
February 25, 2012 at 6:50 pm #440011You 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 (); ?>1 user says Thank You to khoand for this useful post
antonyw Friendantonyw
- Join date:
- February 2012
- Posts:
- 21
- Downloads:
- 0
- Uploads:
- 12
- Thanks:
- 5
- Thanked:
- 2 times in 1 posts
February 25, 2012 at 6:53 pm #440012yes, it works 😀 😀 khoand, you are great man, just great.. thanks a million 😉
AuthorPostsViewing 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
Block inside another block
Viewing 7 posts - 1 through 7 (of 7 total)