Find the Exponential Software extensions you want
UNIX name | Owner | Status |
---|---|---|
ezattributefallback | Bartek Modzelewski | beta |
Version | Compatible with |
---|---|
0.5 | 4.0+ |
Simple template operator that search for similar attributes in parent objects. In case if in current node image attribute is empty, it checks if parent's node has image set, returns it if yes.
Many different cases are possible including MaxParents or AlternativeAttribiteIdentifiers parameters to specify.
ezattributefallback( <MaxParents>, <NodeID>, <AdditionalAttributes> )
Example of use: specific banner image for page. If not set - take banner set in parent node.
Example 1:
\code
{$node.data_map.banner|ezattributefallback()}
\endcode
Example 2:
\code
{$node.data_map.banner|ezattributefallback( 2, null, array( 'banner', 'top_image' ) )}
\endcode
Example 3:
\code
{ezattributefallback( false(), $node.node_id, array( 'banner' ) )}
\endcode
More details soon.