Thursday, September 25, 2008

ExpressionEngine Category for Entry

I wanted to display the category of an entry so that the end result would look like the following, where Ruby on Rails is the category:

RUBY ON RAILS
Scaling ActiveRecord
Thursday September 25, 2008 at 10:26pm

I couldn't find any examples, but the snippets in TextMate helped me out. Here is the code:

{exp:weblog:entries weblog="posts"}
{categories weblog="posts"}
{category_name}
{/categories}
{gmt_entry_date format="%l %F %d, %Y at %g:%i%a"}
{/exp:weblog:entries}

No comments:

Post a Comment