[SOLVED] How to extract category names from news list?
Posted: Thu Jul 12, 2007 4:42 pm
Hi all,
I'm trying to style my news summary template.
That's the downsized pure standard news summary template just showing title and summary (with "_odd" and "_even" addons for styling an alternating background per entry)
This news summary page is shown after the user has chosen a respective news category. I want this category placed once above the first news summary entry.
...or...
...or even
...don't work properly. The category label is shown ("Kategorie:" in german), but the category itself is not...
How can I extract the category name out of the entry array? My smarty knowledge is very poor yet...
I'm trying to style my news summary template.
Code: Select all
<!-- Start News Display Template -->
{foreach from=$items item=entry}
<div class="NewsSummary">
<div class="NewsSummary{cycle values="_odd,_even"}">
{$entry->titlelink}<br />
{if $entry->summary}
{eval var=$entry->summary}
{else if $entry->content}
{eval var=$entry->content}
{/if}
</div>
</div>
{/foreach}
<!-- End News Display Template -->
This news summary page is shown after the user has chosen a respective news category. I want this category placed once above the first news summary entry.
Code: Select all
<h1>{$category_label} {$entry->category}</h1>
Code: Select all
<h1>{$category_label} {$item->category}</h1>
Code: Select all
<h1>{$category_label} {$category_name}</h1>
How can I extract the category name out of the entry array? My smarty knowledge is very poor yet...