Mon Sep 10 22:28:00 UTC 2007
Radiant CMS - Showing the date of articles
One of my sites (http://tec.onghu.com/) is powered by the Radiant CMS. As I continue to build that site, I shall put up some information about how simple things are done in Radiant.
One of the things that I have is a running list of articles that have been published on different dates. I wanted a simple way to print out the date next to the articles.
Here’s what you need to do for that:
<ul>
<r:find url="articles">
<r:children:each order="desc" status="published">
<r:unless_content part="no_menu"><li><r:link /> [<r:date format="%b %d, %Y" />]
</r:unless_content></r:children:each>
</r:find>
</ul>
Notice 2 interesting things in the code sample above.
- r:date format – this expects a formatting string similar to what strftime in Ruby/ Rails expects.
- r:unless_content part=”no_menu” – this tag is a bit that excludes some pages from being shown in the listing. Any page that has a part called ‘no_menu’ will not be listed. This is a common way to prevent CSS files from showing in the list.
That’s all there is to it. Leave a comment if you want any bit above clarified.
hisbullah said,
April 4th, 2008 at 08:05 AM
Hello Ez Internet Timer helps you repress, record and leach Internet pursuit on your or your children PC. It whim automatically piece Internet, e-correspondence, messengers and whim inhibit them pieceed for as extensive as you arrange it. computer keeps powering off and on turn off computer window disappeared play video clips off phone on computer computer shuts off middle game get aol off my computer new horizons computer learning center rip off it is now safe to turn off your computer computer monitor cuts off clean file off computer free off lease computer how to kick other computers off the network computer starts then turns off windows 98 now safe to turn off computer off lease laptop notebook computer permanently delete files & email off computer not allow computer turn off internet security Bye