Thursday 20 July 2006 10:13:28 am
Hi, I am encountering some problems which I cannot diagnose: see the following piece of code.
{set-block scope=root variable=cache_ttl}0{/set-block}
...........
...........
{cache-block keys=$node.node_id subtree_expiry='content/view/full/60' expiry=86400}
<ul>
{set $links = fetch(content, list, hash(parent_node_id, 60,
sort_by, array('priority', true())))}
{foreach $links as $link}
{if $link.node_id|eq($node.node_id)}
<p class="orange_no_link"><img src={'arrows_no_linksx.gif'|ezimage} border="0">{if $link.object.data_map.nome_abbreviato.data_text|count|gt(0)}{attribute_view_gui attribute = $link.object.data_map.nome_abbreviato}{else}{attribute_view_gui attribute = $link.object.data_map.nome}{/if}</p>
{else}
<li><a href={$link.url_alias|ezurl}>{if $link.object.data_map.nome_abbreviato.data_text|count|gt(0)}{attribute_view_gui attribute = $link.object.data_map.nome_abbreviato}{else}{attribute_view_gui attribute = $link.object.data_map.nome}{/if}</a></li>
{/if}
{/foreach}
</ul>
........
{/cache-block}
It displays the names of some fetched nodes or some short name, depending on whether the short name is set or not, and makes the link clickable or not based on which node I am viewing. I am encountering this problem: when caches are generated after a manual deletion via admin interface, everything works well. but it happens that sometimes, the links generated by this code contain a layout/set/print part which makes the template be displayed as if it were a print layout. this template has no provisions for generating print layout links, so I am wondering what causes this problem.
Has anyone had this problem? Cheers, Max
|