solved Adding fields to Group Discussion listings

Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
Members have told me that it's confusing to them that the results for Group Discussions and Forum Discussions (this is a Ning site on JR so other skins/sites may not have Forum Discussions) are different.

As I am relatively new to JR one of my ongoing challenges is knowing exactly which template to modify and in which module it's located.

I am looking to add fields to the Group Discussion item (display Date and Poster, text from the description) to make it similar to the Forum discussion display.

Where is this done for Forum Discussions (search results)?
Where is this done for Group Discussions (search results)?

Once I know that, I can cut and paste and modify the code to make it work.
updated by @claygordon: 02/28/15 05:50:36PM
paul
@paul
9 years ago
4,326 posts
By default these are handled by the item_search.tpl template in each module's template section.


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
So instead of

{$item.forum_text| ...

which in the jrForum item_search.tpl, change it to

{$item.discuss_description| ...

in jrGroupDiscuss item_search.tpl
paul
@paul
9 years ago
4,326 posts
Not sure which templates you are trying to change but $item.forum_xxx would not be available in the GroupDiscuss templates, and visa versa.
Stick a {debug} in the template first just to see what you have to play with.


--
Paul Asher - JR Developer and System Import Specialist
Clay Gordon
Clay Gordon
@claygordon
9 years ago
733 posts
Paul -

I tried to get debug to work but the output gets displayed inline in the page, not in a pop-up window. I think I was working with Michael on this.

Yeah, I guessed that $item.forum_xxx would not be available in the Forums module. I was guessing it was $item.discuss_description. I went ahead with that thought and got it to work. If I was more ambitious I would add the member photo but this can be a photo-heavy page so I did not want to make it heavier.

--- edited to add ---

The first time I added a {debug} I wasn't thinking and did it inside a {foreach}. Ouch. Painful.
updated by @claygordon: 01/28/15 06:18:25PM
paul
@paul
9 years ago
4,326 posts
Yeah - Be careful where you put your debugs lol

I often get 'inline' debug dumps when using Safari. There's probably a setting for it somewhere in the browser but when it does happen, I switch to FF instead and get the proper popup.


--
Paul Asher - JR Developer and System Import Specialist

Tags