Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Groups module positions

10 years 11 months ago
  • Mike's Avatar
    Topic Author
  • Mike
  • Offline
  • Fresh Boarder
  • Posts: 20
  • Thank you received: 0
Licenses:
JomSocial Active

The built in module positions for jomsocial groups display the module in all groups. Is there a way we can display different modules in different groups using these module positions? I have read previous forum topics and they say it is not possible but these were posted a long time ago, is this now possible?

10 years 11 months ago
Licenses:

Hi, Mike.

This is possible only by customizing code. You need to add php condition in

ROOT/components/com_community/templates/default/groups.viewgroup.php

Condition should look ike this:

<?php if($group->id == '8') { 
    	$this->renderModules( 'my_position_1' );
    } ?>

It means that 'my_position_1" module position will be displayed only in group with ID = 8

Edd this code inside div cSidebar (around line 375).

Remember to do it as override. Copy file to ROOT/templates/your-template/html/com_community (if you don't have "html" or "com_community" folders, feel free to create them).


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
10 years 11 months ago
  • Mike's Avatar
    Topic Author
  • Mike
  • Offline
  • Fresh Boarder
  • Posts: 20
  • Thank you received: 0
Licenses:
JomSocial Active

Many Thanks. Please can you tell me what php file i need to add this code to if i wanted to display different modules when a different group category is selected. Image attached.

Attachment ScreenShot06-27-14at01.21PM.PNG not found

Attachments:
10 years 11 months ago
Licenses:

Hi, MIke.

This time you need to edit: ROOT/components/com_community/templates/default/groups.index.php

Add this code right under cSidebar div in line 28:

<?php
			if (JRequest::getInt( 'categoryid' ) == '3') {
				$this->renderModules( 'my_position_1' );
				}
			?>

Code says: if category with id 3 is displayed -> display also my_position_1 :D


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW