How can i add a new module position please?

GK User
Wed Jan 18, 2012 6:50 pm
Hi, i would like to add a new module position at the very top of the template before header(logo, icons...)
Please help me, in which file should i change something and what code to add please?
Thank you very much for your help.
User avatar
Fresh Boarder

GK User
Wed Jan 18, 2012 9:54 pm
Hello,
you can edit the blocks in file "header.php" for a block at the top of your page.
It is located in the template folder in layouts/blocks/

Code to add could look like that as an example
Code: Select all
<?php if( $this->modules('MyOwnTopBanner')) : ?>
<div class="clear clearfix">
      <jdoc:include type="modules" name="MyOwnTopBanner" style="<?php echo $this->module_styles['MyOwnTopBanner']; ?>" />
</div>
<?php endif; ?>


To show a module in the new module position just add in the position the text in module option backend "MyOwnTopBanner".

The comfort way is to add the module position into the template informations. After adding in it you can choose it like all the other position in the list.

Remember to save the original files and that you have to do the changes in every update again, if files are overwriten!!!
User avatar
Senior Boarder

GK User
Wed Jan 18, 2012 10:07 pm
Oh, thank you so much !!
i wanted it at the very topof the site before the logo, i aded th code in logo.php and it is perfect.
Thank you, really !!
User avatar
Fresh Boarder

GK User
Wed Jan 18, 2012 10:22 pm
testeuse wrote:Oh, thank you so much !!
i wanted it at the very topof the site before the logo, i aded th code in logo.php and it is perfect.
Thank you, really !!


No problem. I am just happy that I could help you.
User avatar
Senior Boarder

GK User
Thu Jan 19, 2012 2:12 am
Please remember to add position to templateDetails.xml file.
User avatar
Platinum Boarder

GK User
Thu Jan 19, 2012 11:30 am
Yes, i did it. thank you!
Everything is fine :-)
User avatar
Fresh Boarder


cron