Path

ez projects / ezattributefallback


eZ Attribute Fallback

UNIX name Owner Status Version Compatible with
ezattributefallback Bartek Modzelewski beta 0.5 4.0+
Simple template operator that search for similar attributes in parent objects.

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.

Parameters

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.

No news yet.

This project has no reviews yet. Be the first one to review it!

No forum messages yet.