[fields:] Short Tag
Built-in Feature
The [fields:] short tag displays all or specified Custom Fields of the current Item.
Note:
[fields:] renders a widget "Item Custom Fields Widget" (<div class="evo_widget widget widget_core_item_custom_fields">...</div>) and cannot appear inside a paragraph. (b2evolution will automatically move it out of the paragraph).Syntax Breakdown
[fields :Custom Fields List ]
- Custom Fields List: optional comma-delimited list of custom field codes.
Samples
Display a Table of All Fields
[fields] will display all Custom Fields of the current post (except those that are defined as hidden) in table format.
![[fields:] Short Tag](/__archive/assets/484b95761c6266de3a8942c0.png)
Display a Table of Specific Fields
[fields:first_numeric_field,first_string_field,second_numeric_field] will display only the fields referenced explicitly (by their field code) in table format.
![[fields:] Short Tag](/__archive/assets/9278ddd611eda8eadf47ee81.png)
Recursion
If you are using fields in a Content Block, you can control the level at which they are resolved by using [-fields:...], [--fields:...] etc. Each - pushes the resolution up one level to the caller.