Sunday 12 February 2006 11:43:46 pm
Kristof, I placed the attribute show in the loop :
<node>
{section name=News loop=$news_list max=5} {*{node_view_gui view=random_locations content_node=$News:item}*} HERE
{/section} </node> And yes I created the random_locations.tpl (node/view). Everything works fine without the fetch based on attribute. Here's the whole structure : A include in a cutsom folder.tpl :
{cache-block}
{include uri="design:random_locations.tpl"}
{/cache-block}
random_locations.tpl :
{set-block scope=root variable=cache_ttl}86400{/set-block}
{let rubrique_noeud=5644
news_list=fetch('content','list',hash( parent_node_id, $rubrique_noeud,
class_filter_type, 'include',
class_filter_array, array( 'annonce' )))|shuffle}
{section name=News loop=$news_list max=5}
{node_view_gui view=random_locations content_node=$News:item}
{/section}
{/let}
This one is ok and print "annonce" class with the custom view. No way when I add a fecth based on attribute. And finally, the custom view :
<div class="content-view-random-locations">
<div class="class-article">
<div class="location-short">
{section show=$node.object.data_map.photo1.content}
<div class="attribute-image">
<div class="crop">
<a href={$node.url_alias|ezurl}>{attribute_view_gui image_class=small attribute=$node.object.data_map.photo1}</a>
</div>
</div>
{/section}
{$node.object.data_map.ville.content} ({$node.object.data_map.cp1.content})<br>
{attribute_view_gui attribute=$node.object.data_map.typedebien}
{attribute_view_gui attribute=$node.object.data_map.nbpersonnes}
</div>
</div>
</div>
|