Add new module next to header

April 2013 Joomla Templates
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sat Mar 15, 2014 12:23 pm
Reply with quote
Report this post
Hi, I am trying to follow the instructions to add a new module position to the right of the header module from here

http://www.gavick.com/documentation/joo ... -position/

Everything works except the new module is appearing beneath the header and not floating on the right of the header.

Here is the code from the default.php where the header is displayed

<div id="gkHeader" class="gkPage">
<jdoc:include type="modules" name="header" style="<?php echo $this->module_styles['header']; ?>" />
</div>

And this is the code I add beneath it but the new module is displaying beneath the header.

<?php if($this->API->modules('donate_sidebar')) : ?>
<div id="gkDonateSidebar" class="gkPage">
<jdoc:include type="modules" name="donate_sidebar" style="<?php echo $this->module_styles['donate_sidebar']; ?>" />
</div>

How can I get the new module positioned along side the header?
User avatar
Fresh Boarder

GK User
Sun Mar 16, 2014 8:26 am
Reply with quote
Report this post
Could You please post an url to your site?
Could you create a screenshot of how it should look?
User avatar
Moderator

GK User
Sun Mar 16, 2014 11:54 am
Reply with quote
Report this post
Cyberek wrote:Could You please post an url to your site?
Could you create a screenshot of how it should look?


Hello, I have sent you a PM with login details to the website. Thanks.
User avatar
Fresh Boarder

GK User
Mon Mar 17, 2014 1:07 pm
Reply with quote
Report this post
You have placed the module inside:
Code: Select all
<div id="gkPageContentWrap"<?php if($this->API->modules('inset and sidebar')) : ?> class="gk3Columns"<?php endif; ?>>

and should place it inside:
Code: Select all
<div id="gkTop"<?php if(!$this->API->modules('header')) : ?> class="noheader"<?php endif; ?>>
      <div class="gkPage">

just before:
Code: Select all
         <div id="gkSearch">
            <jdoc:include type="modules" name="search" style="<?php echo $this->module_styles['search']; ?>" />
         </div>
         <?php endif; ?>

You also don't need gkPage class on that module.

Now you will also need to add some custom css:
Please edit: /templates/gk_rockwall/css/override.css and add at its end:
Code: Select all
#gkDonateSidebar {
float: right;
}

Remember to enable "CSS override" in template settings - advanced section.
User avatar
Moderator

GK User
Mon Mar 17, 2014 3:37 pm
Reply with quote
Report this post
I tried your code changes but they make the new module appear to the right of the search bar not the header. I have managed to achieve what I set out to do with the following:

Add the new module code after

Code: Select all
<div id="gkHeader" class="gkPage">
<jdoc:include type="modules" name="header" style="<?php echo $this->module_styles['header']; ?>" />
</div>


The gkHeader must be floated left and 14px padding added to the right
A new container div must be added to keep the header and new module in the centre of the page or they will just move to the left of the page
After the line

Code: Select all
<div id="gkPageContentWrap"<?php if($this->API->modules('inset and sidebar')) : ?> class="gk3Columns"<?php endif; ?>>


Add

Code: Select all
<div class="gkPage">


And close the div before

Code: Select all
        </div>
      
      <?php if($this->API->modules('bottom1')) : ?>
User avatar
Fresh Boarder

GK User
Mon Mar 17, 2014 6:54 pm
Reply with quote
Report this post
All the time I was thinking header as top module holding logo, menu etc.
What you did makes 100% sense.
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.