1. REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Resolved Can you tell me how to use custom fields template

Discussion in 'Showcase Support' started by Isxforo, Sep 26, 2019.

  1. Isxforo

    Isxforo New Member AMS Showcase

    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.

    Yours.
     
  2. Bob

    Bob Developer Staff Member

    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).
     
    Isxforo likes this.
  3. Isxforo

    Isxforo New Member AMS Showcase

    Very usefull.
    Thanks for you with detail explanation. :love:
     
    Bob likes this.
  1. 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.