How to fill the background ?

GK User
Wed Aug 22, 2012 11:46 pm
Hello guys,

could I know please I to fill the background (see image below) of this template in the home page with an image or with Google AdWords Banner (in this case, the question is how to place them, in which module position) ?

Thanks in advance
User avatar
Expert Boarder

GK User
Thu Aug 23, 2012 1:52 am
Hi

That's two different things.

If you want to set background image, you can use this code (similar) on override.css file (don't forget to enable first on template parameters)

Code: Select all
body {background: #fff url('../images/your_image.jpg') no-repeat;}


In other hand, if you want to populate that space with some floating module (for example), you can do it like this:

1) Open templateDetails.xml and add new position (i.e.)

Code: Select all
<position>float_left</position>


2) Open ../lib/framework/gk.const.php

after this line:
Code: Select all
'cart' => 'none',


add this one
Code: Select all
'float_left' => 'none',


3) Open ../layouts/default.php and before this line:
Code: Select all
<div id="gkPage" class="gkWrap">


add this lines:
Code: Select all
<?php if( $this->modules('float_left')) : ?>

          <div id="gkFloat_Left">

             <jdoc:include type="modules" name="float_left" style="<?php echo $this->module_styles['float_left']; ?>" />

          </div>

          <?php endif; ?>


4) Open ../css/override.css file and add this lines.

Code: Select all
#gkFloat_Left {position: fixed; float: left; padding: 10px; overflow: hidden; width: 10%; background: #fff;-webkit-box-shadow: 0 0 6px #c1c1c1;-moz-box-shadow: 0 0 6px #c1c1c1;box-shadow: 0 0 6px #c1c1c1; -webkit-border-radius: 2px;-moz-border-radius: 2px;border-radius: 2px;}


5) Go to Modules Manager and populate "float_left" position with some module.

That's it.
You now have a floating module on the left of the template.

It should looks something like this:
screen.png


Cheers
User avatar
Platinum Boarder

GK User
Thu Aug 23, 2012 8:03 am
Great answer!

Thank you very much, I'll try.
User avatar
Expert Boarder