By Edgar on Wednesday, 17 June 2015
Posted in Wanderers
Replies 7
Likes 0
Views 1.2K
Votes 0
Hello,

I would like to know how I can create a position in wanderers template like shown on the screenshot attached. The page concerned is a k2 item and I would like to have the possibility to set a module below the item ?

Thanks a lot for your help,

Edgar
Hi Edgar,

Sorry for late respond.
By default, Wanderers don't have any module position there, but here the solution:

First, you need to open index.php file in the Wanderers' directory.
Here the directory path: /templates/wanderers/index.php

In that file, you can see the default module position code. Then find this line :

<?php if ($input->get('option', '', 'default') == 'com_easysocial') { ?>
<jdoc:include type="component" ></jdoc:include>
<?php } else { ?>
<div class="content-section">
<jdoc:include type="component" ></jdoc:include>
</div>
<?php } ?>


After that add another module position code at the end of that line of code.
For an example i add module position-9 to the file.

And you gonna get something like this :

<?php if ($input->get('option', '', 'default') == 'com_easysocial') { ?>
<jdoc:include type="component" ></jdoc:include>
<?php } else { ?>
<div class="content-section">
<jdoc:include type="component" ></jdoc:include>
</div>
<?php } ?>


<?php if ($this->countModules('position-9')) { ?>
<div>
<jdoc:include type="modules" name="position-9" ></jdoc:include>
</div>
<?php } ?>


As you can see i add new module position code there.

New Module Position Code (position-9) :
<?php if ($this->countModules('position-9')) { ?>
<div>
<jdoc:include type="modules" name="position-9" ></jdoc:include>
</div>
<?php } ?>


By adding this code you already add one more position (position-9) in Wanderers.
Now you can activate and set any module to that position at your backend by typing
position-9 at your module position setting.

Hope this would help you.

Regards,
Ridhwan Razak
·
Wednesday, 17 June 2015 16:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Edgar,

Sorry for late reply, we meet again here
Maybe i'm a bit misunderstanding, but i can't see any screenshot attached here.

It's possible to set another position if the position is on the template layout (not in the component),
but i need to see the screenshot first before i proceed to the solution.

Regards,
Ridhwan Razak
·
Wednesday, 17 June 2015 12:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry fort the mistake, it was late for me yesterday

Here is the screenshot.

Thanks a gain for your help,

Edgar
·
Wednesday, 17 June 2015 13:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks you very muck, it's perfect.

I just need one more thing. Now the position created is immediately below the default position (Screenshot named "Before"). I would like there is a gap like there is between different modules on position 7 (Screenshot named "After"). How can I do that ?

Thanks for your help,

Edgar
·
Thursday, 18 June 2015 03:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Edgar,

You can simply put a gap by adding <br> tag right before the new module position code.
Here an example :

<?php if ($input->get('option', '', 'default') == 'com_easysocial') { ?>
<jdoc:include type="component" ></jdoc:include>
<?php } else { ?>
<div class="content-section">
<jdoc:include type="component" ></jdoc:include>
</div>
<?php } ?>

<br>

<?php if ($this->countModules('position-9')) { ?>
<div>
<jdoc:include type="modules" name="position-9" ></jdoc:include>
</div>
<?php } ?>


That <br> tag would make a line break between those two section.

Hope this would help you

Regards,
Ridhwan Razak
·
Thursday, 18 June 2015 11:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks you very much, it solved my problem

Have a nice day,

Edgar
·
Thursday, 18 June 2015 13:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Your welcome, keep us updated and see how it goes.
Have a nice day too

Regards,

Ridhwan Razak
·
Thursday, 18 June 2015 13:26
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post