Item Titles/Subtitles are now collection-sensitive
Overview
It's now possible for an item to display different Titles/Subtitles depending on which collection it belongs to. This is primarily intended to help you differentiate between template items and live items.
Who will be affected?
This change will affect:
- users who create designs
- users who create template items
Details
A template item usually contains a custom Title/Subtitle, often including variables that will be populated when a live item is created from that template. While this powerful customisation is useful, it can make distinguishing between templates and live items tricky!
Therefore, you can now specify multiple Title/Subtitle values in a design, and items will use the appropriate Title/Subtitle for the collection they're in.
This enables you to label your template items effectively, while ensuring live items created from those templates will use the intended Title/Subtitle. You could also do this for archived items.
To do this, use #if
and #else
conditions in your Mustache templates that reference specific collections. For example:
{{#if collection_live}}Live Item Title{{#else}}Some Other Title{{/if}}
You can also use #elif
("else if") to add more conditions. For example:
{{#if collection_template}}Template Title
{{#elif collection_archive}}Archived Title
{{#else}}{{attributes_streetLightingUnitsUnitNumber}}
{{/if}}
Expected Release Date
29th July 2022 as part of the Alloy v2.39 release