[SOLVED]New module position

Professional Jomal template designed to be easily adaptable to all kinds of business
GK User
Thu Nov 03, 2011 8:55 pm
I would like to know how to add a new module position on the corporate 2 template with J1.5

I would like to add it to the right of the 'banner1' position so that the 2 module positions share a 80% (banner1) to 20%(banner1_right)... Values are approximate.

I followed some instructions in another post, adding a new position called 'banner1_right' in the templatedetails.xml file. Then found the layout block containing banner1 AND banner2 so I put it in there, before 'banner1' so it said something along the lines of what's below.

Code: Select all
<?php if($this->countModules('banner1')) : ?>
<div id="banner1_right">
<jdoc:include type="modules" name="banner1_right" style="none" />
</div>
<?php endif; ?>

<?php if($this->countModules('banner1')) : ?>


Step 3 would have been to add the style code for 'banner1_right' in what should apparently have been gk_stuff.css (instructions were for a different gk template). I actually wanted to put it in the same file as the 'banner1' styling but couldn't find it anywhere in the templates css folder. The styling code didn't work in gk_stuff and the module didn't show up.

The module position shows as an option but that is as far as it goes....

Can anyone suggest to me where the styling for 'banner1' might be?

Any help would be awesome.

Thanks
User avatar
Senior Boarder

GK User
Fri Nov 04, 2011 8:35 pm
I managed to overcome the issue.

For those that are at all interested:

I added my new module name 'banner1_right' to the templatedetails.xml

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



Found this in the header.php...

Code: Select all
<?php if( $this->countModules('banner1') ): ?>
<div id="banner1" class="head clear">
      <jdoc:include type="modules" name="banner1" style="none" />
</div>
<?php endif; ?>


And then added this right below it...

Code: Select all
<?php if( $this->countModules('banner1_right') ): ?>
<div id="banner1_right">
      <jdoc:include type="modules" name="banner1_right" style="none" />       
</div>
<?php endif; ?>


Then I added this to the template.css in a suitable position...

Code: Select all
/*
 * Banner1 modules
 */
#banner1 {float:left; width:750px; margin: 0 0 10px 0; box-shadow: 7px 7px 5px #003869;}
#banner1_right {float:right; width:200px; display:inline-block; margin:0 0 10px 10px; background-color:#fff; padding: 10px; color:#00539b; border-radius:5px; height:230px; box-shadow: 7px 7px 5px #003869;}
 


It may or may not be the way to go about things but I got the result I was looking for.


result.jpg



I hope this can be of some help to someone.

Thanks
User avatar
Senior Boarder

GK User
Mon Nov 07, 2011 8:17 am
I just want to thank you for taking the time to share this.
User avatar
Platinum Boarder

GK User
Mon Nov 07, 2011 10:37 pm
I will share what I can when I learn it :cheer: Thank you for your appreciation
User avatar
Senior Boarder


cron