Adding new module position in the userarea "spot"

GK User
Fri Jun 01, 2012 1:23 pm
Hi there,

I've tried adding a new module position to the template using this guide:
https://www.gavick.com/documentation/jo ... -position/

However even though i've tried following it fairly strictly i simply can't get it to show up. I've got it showing up in my list of availeble module positions, but not on the template itself.

I've added the following snippets (the position i'm trying to add is socialmedia):

Code: Select all
<positions>
      <position>socialmedia</position>
      <!-- Template specific Module Positions -->
      <position>search</position>
      <position>breadcrumb</position>


Code: Select all
// definitions of module positions default styles
$GK_TEMPLATE_MODULE_STYLES = array(
      
   'search' => 'none',
   'banner1' => 'none',
   'banner2' => 'none',
   'breadcrumb' => 'none',
   'header1' => 'gk_style',
   'header2' => 'gk_style',
   'footer_nav' => 'none',
   'login' => 'gk_style',
   'register' => 'none',
   'socialmedia' => 'none',


and

Code: Select all
<?php if($this->modules(‘socialmedia’)) : ?>
<div>
<jdoc:include type=”modules” name=”socialmedia” style=”<?php echo $this->module_styles['socialmedia']; ?>” />
</div>
<?php endif; ?>


I can select the position in the module list, but i can't get the module to show on the frontpage.
User avatar
Fresh Boarder

teitbite
Sat Jun 02, 2012 8:54 am
Hi

It's a right way. Add a class to layer of this new module for example:

Code: Select all
<div class="socialmedia"></div>


and show me Your site. I believe it's hidding behind visible part of the site.
User avatar
Moderator

GK User
Mon Jun 04, 2012 8:47 am
Hey and thanks for your reply.

My site is offline for the time being, is there anyway i can PM you the user and password to you? That would be very helpful :)
User avatar
Fresh Boarder

GK User
Mon Jun 04, 2012 8:55 am
Sorry i couldn't edit the previous post, but I just noticed your signature and just sent you an email to that address with the info you need. Thanks again
User avatar
Fresh Boarder

teitbite
Tue Jun 05, 2012 7:08 am
Hi

Sorry, but I didn't get a mail. Can You please send it one more time ?
User avatar
Moderator

GK User
Fri Jun 15, 2012 12:30 pm
teitbite wrote:Hi

Sorry, but I didn't get a mail. Can You please send it one more time ?


Sent :)
User avatar
Fresh Boarder

teitbite
Sat Jun 16, 2012 10:02 am
Hi

I've used this code to add module position:

Code: Select all
<?php if($this->modules(‘socialmedia’)) : ?>
<div class="socialmedia">
<jdoc:include type=”modules” name=”socialmedia” style=”none” />
</div>
<?php endif; ?>


and this to style it a little bit:

Code: Select all
.socialmedia {
float:right;
}
User avatar
Moderator

GK User
Mon Jun 18, 2012 10:20 am
Awesome, thank you for your help.

Just a quick followup question, i was wondering why the change in the code used to add the module was needed?

Again thank you :)
User avatar
Fresh Boarder

teitbite
Tue Jun 19, 2012 12:34 pm
Hi

Module positions are defined inside HTML, so if You need a new module position it's neccessary to tell template where this module should be displayed and css change to fix its position.
User avatar
Moderator

GK User
Sun Jul 08, 2012 3:29 am
I have followed the instructions on wiki but i only see the module position in the joomla 2.5 modules. i can select it but i dont see it on the template itself..... what is the next step
User avatar
Fresh Boarder

teitbite
Mon Jul 09, 2012 12:18 pm
Hi

You need to specifie where new module position should be opening Yourself. Please show me a code from a file You've placed it.
User avatar
Moderator


cron