[parent:] Short Tag
Built-in Feature
The [parent:] short tag is used to reference the parent of an Item. This works similarly to the [item:] Short Tag.
Note: An Item can be linked to a parent Item in the Item Properties Panel.
Note:
[parent:...] 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
[parent: ( "titlelink" | "url" | <fields short tag> ) ]
- titlelink: specify this to render parent title with link
- url: specify this to render parent URL
- <fields short tag>: see
[fields:]short tag
Samples
Linking to the Parent Item
[parent:titlelink]
[parent:url]
Displaying All Fields of the Parent Item
[parent:fields]
Displaying Specific Fields of the Parent Item
[parent:fields:first_numeric_field,first_string_field,second_numeric_field]
Displaying the Value of a Specific Field of the Parent Item
[parent:field:first_string_field]
Recursion
If you are using fields in a Content Block, you can control the level at which they are resolved by using [-parent:fields:...], [--parent:fields:...] etc. Each - pushes the resolution up one level to the caller.