Example position name i have used is "customtop". You can use anything you like, just make sure you change name in other needed places.
1. Adding necessary php code.
Find File: \templates\gk_game_magazine\layouts\blocks\logo.php
Find Line: 23 which is empty line which is as below
- Code: Select all
22 -?>
23 -
24 - <?php if ($this->getParam('logo_type', 'image')!=='none'): ?>
Add below code in line 23 in empty space.
- Code: Select all
<?php if($this->modules('customtop')) : ?>
<div id="gkCustomtop">
<jdoc:include type="modules" name="customtop" style="<?php echo $this->module_styles['customtop']; ?>" />
</div>
<?php endif; ?>
So you end up with following code
- Code: Select all
?>
<?php if($this->modules('customtop')) : ?>
<div id="gkCustomtop">
<jdoc:include type="modules" name="customtop" style="<?php echo $this->module_styles['customtop']; ?>" />
</div>
<?php endif; ?>
<?php if ($this->getParam('logo_type', 'image')!=='none'): ?>
2. Adding position in xml file.
Find File: \templates\gk_game_magazine\templateDetails.xml
Find Lines: 155 which is below
- Code: Select all
<position>tab10</position>
Add below code after above.
- Code: Select all
<!-- Custom Module Positions -->
<position>customtop</position>
3. Adding position style in php code.
Find File: \templates\gk_game_magazine\lib\framework\gk.const.php
Find Lines: 77 to 79 which is below
- Code: Select all
'bottom11' => 'gk_style',
'bottom12' => 'gk_style'
);
Replace with below
- Code: Select all
'bottom11' => 'gk_style',
'bottom12' => 'gk_style',
'customtop' => 'none'
);
4. Adding css class for our new custom div.
Enable Override: Template settings > Advanced settings > Css override "on"
Find File : \templates\gk_game_magazine\css\override.css
Add your custom css code such as
- Code: Select all
#gkCustomtop { background:#fff; width: auto; }
#gkCustomtop { font-size: 12px; color: #000; }
Now create your module and position it to "customtop".
See you around...