[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](https://b2evolution.net/media/blogs/man/quick-uploads/fields-short-tag/.evocache/fields_short_tag_display_20190926.png/fit-1280x720.png?mtime=1569464806)
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](https://b2evolution.net/media/blogs/man/quick-uploads/fields-short-tag/.evocache/fields_short_tag_display_explicit_20190926.png/fit-1280x720.png?mtime=1569464829)
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.