{def $video_attribute_id = ezini('ProductSheetResources','BlipVideoAttributeID','nuxeo.ini') $gallery_attribute_id = ezini('ProductSheetResources','FlickrGalleryAttributeID','nuxeo.ini') $resources_attribute_id = ezini('ProductSheetResources','ResourcesAttributeID','nuxeo.ini') $slideshow_attribute_id = ezini('ProductSheetResources','SlideshowAttributeAtArticle','nuxeo.ini') $videos_array = array() $screenshots_array = array() $screenshotrelated_object = array() $features = fetch( 'content', 'list', hash( 'parent_node_id', $product_sheet_overview_node.node_id, 'class_filter_type', include, 'class_filter_array', array('product_sheet_feature'), 'sort_by', $product_sheet_overview_node.sort_array, 'depth', 3 ) ) } {foreach $features as $feature} {def $related_objects = fetch( 'content', 'related_objects', hash( 'object_id', $feature.contentobject_id, 'all_relations', true(), 'group_by_attribute', true() ) )} {if is_set($related_objects.$video_attribute_id)} {set $videos_array = $videos_array|merge(array($related_objects)) } {elseif is_set($related_objects.$gallery_attribute_id) } {set $screenshots_array = $screenshots_array|merge(array($related_objects)) } {/if} {undef $related_objects} {/foreach}
{* *} {def $resorces_related_objects = fetch( 'content', 'related_objects', hash( 'object_id', $current_node.contentobject_id, 'all_relations', true(), 'group_by_attribute', true() ) )} {if $resorces_related_objects.$resources_attribute_id|count()}