Mark Irvine
|
Sunday 28 March 2004 2:25:15 pm
Hi, I've created a class with an attribute for an expiry date. I'd like to display articles of this class on my home page, but I only want to create the page items (header, articles etc.) if there are any documents with an expiry date later than today. In other words, I want to show a 'latest news' section on my homepage, but if there is no latest news, and all the docs are past their exiry date, then I don't want to display the 'latest news' header and an empty list... Here's what I'm trying:
{let news_count=fetch('content','list_count',hash(parent_node_id,$news_node.main_node_id,
'attribute_filter',array( array(
'expiry_date',
'>',
currentdate()))))
}
I realize this won't work, but it should give an idea of what I'm trying to do. Basically, I want to know if there are any docs to display based on the attribute 'expiry_date'. Any ideas?
Thanks, Mark
|