[item:] Short Tag
Built-in Feature
The [item:123:xxx:...]
short tag is used to reference an Item using its Slug or Item Id and display its related information or content.
This tag is used in conjunction with the [fields:]
to display information from the referenced Item/Post in the current post.
[item:...]
generates:…a block element when it is used as prefix for short tags
subscribe
, emailcapture
, compare
, fields
and cannot appear inside a paragraph in such a case. (b2evolution will automatically move it out of the paragraph)
inline text when it is used as prefix for short tags like field
, url
, titlelink
, etc. and can appear anywhere in such a case (inside a paragraph, table, etc.)
Syntax Breakdown
[item:
( Item ID | Slug ) :
<fields short tag> ]
- Item ID: ID of the Item to reference
- Slug: slug of Item to reference
- <fields short tag>: see
[fields:]
short tag
Samples
Displaying the Value of a Specific Field of an Item
[item:another-custom-fields-example:field:first_string_field]
or [item:26:field:first_string_field]
In the first case we reference the other item with a slug. In the second case, we reference the other item by its Item Id.
Displaying Specific Fields of an Item
[item:26:fields:first_string_field,url_field]
Displaying All Fields of an Item
[item:another-custom-fields-example:fields]