We moved to new unified forum!

Please post all new support queries in our New Forum.

T3 Community Discussion & Support

Let's build the best free Joomla template framework, together!
  1. Guest
  2. Motivator Hole-in-One Smile Seeker
  3. General Discussion
  4. Monday, 16 June 2014
  5.  Subscribe via email
Hi guys!
I must to create a new position next (on the left to the logo).
How can I do?

I insert an attachments.

Thanks in advance!
Attachments (1)
Comment
There are no comments made yet.
Accepted Answer
Accepted Answer Pending Moderation
0
Votes
Undo
You have to change position size a little bit.

Here is the full header.php file with a new position added to right side:

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

// get params
$sitename = $this->params->get('sitename');
$slogan = $this->params->get('slogan', '');
$logotype = $this->params->get('logotype', 'text');
$logoimage = $logotype == 'image' ? $this->params->get('logoimage', 'templates/' . T3_TEMPLATE . '/images/logo.png') : '';
$logoimgsm = ($logotype == 'image' && $this->params->get('enable_logoimage_sm', 0)) ? $this->params->get('logoimage_sm', '') : false;

if (!$sitename) {
$sitename = JFactory::getConfig()->get('sitename');
}

$logosize = 'col-sm-12';
if ($headright = $this->countModules('head-search or languageswitcherload')) {
$logosize = 'col-sm-4';
}

?>

<!-- HEADER -->
<header id="t3-header" class="container t3-header">
<div class="row">

<!-- New position -->
<div class="col-xs-12 col-sm-4">
<jdoc:include type="modules" name="<?php $this->_p('header-1') ?>" />
</div>
<!-- //new position -->

<!-- LOGO -->
<div class="col-xs-12 <?php echo $logosize ?> logo">
<div class="logo-<?php echo $logotype, ($logoimgsm ? ' logo-control' : '') ?>">
<a href="/<?php echo JURI::base(true) ?>" title="<?php echo strip_tags($sitename) ?>">
<?php if($logotype == 'image'): ?>
<img class="logo-img" src="/<?php echo JURI::base(true) . '/' . $logoimage ?>" alt="<?php echo strip_tags($sitename) ?>" />
<?php endif ?>
<?php if($logoimgsm) : ?>
<img class="logo-img-sm" src="/<?php echo JURI::base(true) . '/' . $logoimgsm ?>" alt="<?php echo strip_tags($sitename) ?>" />
<?php endif ?>
<span><?php echo $sitename ?></span>
</a>
<small class="site-slogan"><?php echo $slogan ?></small>
</div>
</div>
<!-- //LOGO -->

<?php if ($headright): ?>
<div class="col-xs-12 col-sm-4">
<?php if ($this->countModules('head-search')) : ?>
<!-- HEAD SEARCH -->
<div class="head-search <?php $this->_c('head-search') ?>">
<jdoc:include type="modules" name="<?php $this->_p('head-search') ?>" style="raw" />
</div>
<!-- //HEAD SEARCH -->
<?php endif ?>

<?php if ($this->countModules('languageswitcherload')) : ?>
<!-- LANGUAGE SWITCHER -->
<div class="languageswitcherload">
<jdoc:include type="modules" name="<?php $this->_p('languageswitcherload') ?>" style="raw" />
</div>
<!-- //LANGUAGE SWITCHER -->
<?php endif ?>
</div>
<?php endif ?>

</div>
</header>
<!-- //HEADER -->



The customization from the default file is:

1. Change logo position size from col-sm-8 to col-sm-4

$logosize = 'col-sm-12';
if ($headright = $this->countModules('head-search or languageswitcherload')) {
$logosize = 'col-sm-4';
}


<!-- LOGO -->
<div class="col-xs-12 <?php echo $logosize ?> logo">
<div class="logo-<?php echo $logotype, ($logoimgsm ? ' logo-control' : '') ?>">
<a href="/<?php echo JURI::base(true) ?>" title="<?php echo strip_tags($sitename) ?>">
<?php if($logotype == 'image'): ?>
<img class="logo-img" src="/<?php echo JURI::base(true) . '/' . $logoimage ?>" alt="<?php echo strip_tags($sitename) ?>" />
<?php endif ?>
<?php if($logoimgsm) : ?>
<img class="logo-img-sm" src="/<?php echo JURI::base(true) . '/' . $logoimgsm ?>" alt="<?php echo strip_tags($sitename) ?>" />
<?php endif ?>
<span><?php echo $sitename ?></span>
</a>
<small class="site-slogan"><?php echo $slogan ?></small>
</div>
</div>
<!-- //LOGO -->


2. Add new position into header block (put it before the logo position)

<!-- New position -->
<div class="col-xs-12 col-sm-4">
<jdoc:include type="modules" name="<?php $this->_p('header-1') ?>" />
</div>
<!-- //new position -->


Please check the image below to see how the front-end looks like.

http://easycaptures.com/fs/uploaded/769/8742510190.png

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

To create new position, please follow the docs: http://t3-framework.org/documentation/bs3-layout-system#add-position

In your case, open the header.php file in the "templates/t3_bs3_blank/tpls/blocks" then add new position. You may have to customize the file a little bit like changing size of logo and search position, etc.

Gardner.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Thank always for your answers!

I've added new position called "headsearch2", and i've inserted it in template.xml.
After I've change /templates/t3_bs3_blank/tpls/blocks/header.php in this way:




<!-- HEAD SEARCH 2 -->
<div class="head-search <?php $this->_c('head-search') ?>">
<jdoc:include type="modules" name="<?php $this->_p('head-search2') ?>" style="raw" />
</div>
<!-- //HEAD SEARCH 2 -->

<!-- LOGO -->


It's all ok, but new position is not aligned to the left of logo image.
How can I do?

Please help me!!!
Thanks a lot
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
It's perfect!
Your support is the best ever seen!!! :D
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
Thanks for your kind words, Claudio :)
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Thanks for your kind words, Claudio :)


HiGardner, there is a little problem.
New position can't be hide from layout of responsive template. How can i do?
Thanks a lot
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 5
Accepted Answer Pending Moderation
0
Votes
Undo
Hi,

To enable responsive configuration for module position, please make sure the loading module position includes:

$this->_p


Here is an example:

<jdoc:include type="modules" name="<?php $this->_p('mast-top-1') ?>" style="T3Xhtml" />


Gardner.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 6
Accepted Answer Pending Moderation
0
Votes
Undo
Here there is the code for my new position (in header.php):

<!-- New position -->

<div class="col-xs-12 col-sm-4">

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

</div>

<!-- //new position -->


Your line is yet here, but in responsive layout I can't hide this position:
Attachments (1)
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 7
  • Page :
  • 1


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