1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then 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.

[Enhanced] Custom Fields

Discussion in 'Showcase Closed Suggestions' started by Bob, Mar 11, 2014.

  1. Bob

    Bob Developer Staff Member

    There are a couple enhancements to custom fields in SC 2.0.0

    Display Location: Own Tab

    This allows you to add additional tabs (over and above the 5 content tabs). A Tab can only hold 1 Field Type (best used for Rich text box Field Type).

    Field Type: Rich text box

    This field type uses the redactor editor for data input.

    Category Management

    Available Fields are now listed in the Category Edit (and create) for quickly adding (or remove) custom fields for that particular category.

    Custom Fields Exposed outside of item view

    Custom Field data for each item is now exposed where ever items are "prepared" (which is pretty much everywhere, lists, blocks, widgets etc). They are exposed as $item.customFields <--- an array, so to access a specific element, it would be $item.customFields[fieldId] where as fieldID is the unique ID of that field when you created it.

    PHP:
      ["customFields"] => array(6) {
        [
    "_owntab1"] => string(14"test test test"
        
    ["_owntab2"] => string(0"some test text"
        
    ["_owntab3"] => string(0"weeeeeeeee"
        
    ["_owntab4"] => string(0"nom nom nom"
        
    ["selfplace1"] => string(6"Pizza!"
        
    ["tab1_field2"] => array(2) {
          [
    "COLOR_1"] => string(7"COLOR_1"
          
    ["COLOR_2"] => string(7"COLOR_2"
        
    }
      }
    Phrases are cached and now use Helpers, so to properly display COLOR_1

    The first one is for the TITLE and the 2nd one is for the VALUE

    HTML:
    {xen:helper showcaseFieldTitle, $fieldId}
    
    {xen:helper showcaseFieldValue, $item, $fieldId, {$item.customFields.{$fieldId}}}
     
    oman likes this.
  2. Bob

    Bob Developer Staff Member

    You can now easily add/remove existing custom fields to a category without having to edit each custom field itself to add/remove from the category list.

    The Custom Field Options Tab will list ALL showcase custom fields that are in the system. They are broke out by Location (sidebar, Tab 1, Self Placement etc) and include some basic info like the TYPE of field it is and the field_id (as well as if the field is required).


    Selection_041.png
     
    BT012SS and kezako like 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.