Thursday 28 April 2005 12:16:33 am
Hi, I have two sorts of articles in one "News" folder. I take the 4 most recent and put their title (or name) at the frontpage(and a "Read more" link) . The problem is that article type 1 has a title and article type 2 has no title but a name (yes, it does make sense :) ).
So my problem is that when I use "is_empty" on a title it works fine, however, when there is no title (only a name) I don't get the {section-else} printed. Look at this code:
{section show=$:item.object.data_map.title.content.is_empty|not}
{attribute_view_gui attribute=$:item.object.data_map.title};
{section-else}
{attribute_view_gui attribute=$:item.object.data_map.name};
{/section}
The "is_empty" part is my problem. I cannot test if the title is empty (or full) when an article has a name only... Can I switch the "is_empty" with "does_exists" or something like that? Any other suggestions are very welcome :) Thanks in advance! Trond H
|