Hi,
I am trying to add a module position to the groups page but I am struggling to find where to put the code. I am assuming the code to add a stacked module position called 'test' would be:
<div class="joms-module__wrapper--stacked"><?php $this->renderModules('test'); ?></div>
I am trying to add this module position between the 'members, events, photos, videos, more' tool bar and the 'activities / group details' tabs, as indicated by the arrow in the image below.
I would like this module position to be in the same column as the activities / groups details main section so it sits along side the side column on the left and not above the whole of this main section.
I have tried adding this code to \components\com_community\templates\default\groups.viewgroup.php at line 265 but I'm not even getting a new module position on the page.
Can someone please tell me where I should be inputting this code to create a stacked module position in this location.
Thanks in advance.
HI.
You should copy this file:
ROOT/components/com_community/templates/jomsocial/layouts/groups/single.php
to:
ROOT/templates/your-template/html/com_community/layouts/groups (if you don't have those folders - feel free to create them)
Then add your module code after <div class="joms-middlezone"> in line 814.
This position will appear on EVERY group page so you may consider to use Advanced Module Manager to limit module display to only one group (if needed).
HI.
First type in that line xxxxx to see if it will appear in place you want.
If it does (and it should as I tested it) - then also modules should show up.
So maybe module setings.
Images are too small to see details, please, host them in any web services or directly on your server - I need to see them bigger.
Hi Micheal xxxx is appearing on the page where I want to module to be, there must be something wrong with my code?
<div class="joms-module__wrapper--stacked"><?php $this->renderModules('test1292'); ?></div>
If there is nothing obvious i will upload images again.
HI.
Code is fine... maybe try not wrapping it with div yet.
HI.
So removing div helped?
And when you wrap it with <div class="joms-module__wrapper--stacked"> module is not visible? Is that correct?
Hi Michal,
This is where i'm getting confused...
Originally the module position was not displaying with the div tags. After removing the div tags so only the code
<?php $this->renderModules('test1292'); ?>
<div class="joms-module__wrapper--stacked"><?php $this->renderModules('test1292'); ?></div>
Hi.
Dobra, I solved it :)
You need to use:
<div class="joms-module__wrapper--stacked"><?php $this->renderModules('test1292_stacked'); ?></div>