XF 2.0 Separate Custom thread field in post_macros template

nanto

Member
Hello
I want to show a separate custom thread field in the post_macros template.
Like this:
Code:
{$thread.custom.thread_fields.testfield}
How do I get this to work?
 
That has taken me a long way.
Thank you @Mike

Check boxes only outputs "Array".
And radio buttons will not output the entry of value the text.
 
That gives you the raw field value. You'd generally make manipulations to display it in a particular way. You may be able to do something like this though (untested):
Code:
<xf:macro template="custom_field_macros" name="custom_field_value" arg-value="{$thread.custom_fields.testfield}" arg-definition="{{ $thread.custom_fields.getDefinition('testfield') }}" />
 
No, it does not work that way.
I made some attempts, but I do not get a good result.

But there is another way to reach my goal.
@Mike You helped me very much anyway.
Thank you very much
 
Back
Top Bottom