XF 2.0 Display custom thread fields when browsing forum threads

0ptima

Well-known member
How can I display the custom thread fields when browsing forum threads? In this example, I have a custom thread field called PHP Version that must be filled in when creating a new thread. I would like this custom field to be shown when browsing the forum threads.



191342
 
Don't think you can do that by default. Maybe you could do it by doing a template modification, but I wouldn't know how to do it.

As a suggestion, this addon let's you to do what you want to do.
 
I was able to add it by adding the following to the thread_list_macros template

<xf:if is="$thread.node_id == 5"> <xf:if is="{$thread.custom_fields.phpversion}"> PHP Version: {$thread.custom_fields.phpversion} </xf:if> </xf:if>
Thanks for posting your solution 😎; for something I have in mind I'll also be wanting to display a custom field in the forum thread listing.
 
Top Bottom