That’s exactly what I’m trying to achieve. Only problem is that the no_results conditional doesn’t work for me. I’m calling the code as an embeded template. The exp:tag:entries is working since outputs the date I want if an entry exists. I just can’t get it to display anything in the event that there’s no entry available.
In case you’re wondering, this code is part of an XML file I’m generating.
{exp:weblog:categories weblog="eintraege" show_empty="no" style="linear" category_group="5" disable="categories|member_data|pagination|trackbacks"}
<url>
<loc>{site_url}fli/investment/C{embed:currentCategoryID}/tag/{category_name}</loc>
<lastmod>{exp:tag:entries weblog="eintraege" tag="{category_name}" inclusive="yes" orderby="entry_date" sort="asc" limit="1"}{if no_results}empty{/if}{gmt_edit_date format="{DATE_W3C}"}{/exp:tag:entries}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
{/exp:weblog:categories}
Any ideas?