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.
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
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}}}
Upvote
1