Forums / Setup & design / New objects / Comment13695

Author Topic

Paolo Tramontani

Wednesday 01 October 2003 1:18:19 am

Comment13695

This means that you have built a specific folder which contain (and display as list) all objects with class=23?
If so you can change the url of the <a href=> for each object with class = 23 bringing statically to the same folder for each.

Let's suppose that the folder for the class 23 have the node_id=99.

Than the code should be:

{section name=News loop=$news_list}
<tr>
<td class="menuitem">
<div class="menuname">

{* distinguish your node looking at the class_id *}
{section show=$News:item.class_id|eq(23) }
<a href={'content/view/full/99'|ezurl}>
{section-else}
<a href={concat('content/view/full/',$News:item.node_id)|ezurl}>
{/section}

{$News:item.name|wash}</a>
</div>
<div class="menudate">
({$News:item.object.published|l10n( shortdate )})
</div>
</td>
</tr>
{delimiter}
{/delimiter}
{/section}

NNNB: I am not sure that you can retrieve the class_id of your item with item.class_id. It is only a try. Perhaps it should be item.node.class_id or item.node.content.class_id or some other sintax... I never use it and I can't find it in the docs. If these tries don't work you can try to search for this property in the docs by yourself...

I Hope I understood your needs
Paolo