Cloud you show me the Custom Fileld Template how to use in templates.
I could remmber it within XF1.5 type, but how does it differrent with in SC3.1.x.
Displaying Custom Fields in XF2 is A LOT different than XF1. Its not something that I can TEACH (as I am not a teacher).
Unlike XF1, XF2 has a Custom Fields System (its a standardized system that any content type can implement within an addon). That means that output of custom fields as handled via core templates/macros. Its also a bit more strict in how custom fields can be used. As mentioned, the display is handled via Custom Field Macros. There are no Macro's for displaying Individual Custom Fields.
Note: Self Placement fields are designed to be used for Conditional Checks, not to display content. You can use any field in a conditional simply by seeing of the field is available and set.
Showcase:
Code:
{$item.custom_fields.field_id}
AMS:
Code:
{$article.custom_fields.field_id}
replace 'field_id' with the actual Field Id
This does NOT display the Custom Field Rendered Data, just the raw value (you need to use the Custom Field MACROS for displaying properly rendered data...its not something you can use to display Individual Fields).
There is more information about this at XenForo.com is this is applicable to ANY custom field for any addon (to include Thread Fields, Resource Fields and Media Fields as those use the same system as AMS and Showcase).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.