N nanto Member Jan 19, 2018 #1 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?
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?
N nanto Member Jan 20, 2018 #3 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 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.
Mike XenForo developer Staff member Jan 22, 2018 #4 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') }}" />
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') }}" />
N nanto Member Jan 23, 2018 #5 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
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