I have searched and searched for this to no avail, i hope someone can help me...
Using the News module 2.10.6 on CMSMS 1.8.1, I have a "browse category" page set up.
My page is here: http://www.care-plan-management-system.co.uk/our-news-sandbox/
When you click on say 'human resources' I want it to say 'Human Resources' at the top of the page and then list all of the articles relating to that category. At the moment I cannot fond a way to display the category name at the top of the page as an . Please help!
My summary template code is:
Code: Select all
{if $itemcount > 0}
<!-- Start News Display Template -->
{foreach from=$items item=entry}
<div class="NewsArchiveSummarywrap">
<div class="NewsSummaryLink">
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a>
</div>
{if $entry->postdate}
<span class="newsdate"> {$entry->postdate|cms_date_format}</span>
{/if}
{if $entry->summary}
<div class="NewsArchiveSummary">
<p>{eval var=$entry->summary|truncate:200}</p>
</div>
<div class="NewsArchiveMorelink">
<p><span class="bold"><a href="{$entry->moreurl}"{$entry->moreurl}">Read more</span></a></p>
</div>
{else if $entry->content}
<div class="NewsSummaryContent">
{eval var=$entry->content|truncate:50}
</div>
{/if}
{if isset($entry->extra)}
<div class="NewsSummaryExtra">
{eval var=$entry->extra}
{* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}
</div>
{/if}
{* this is for showing the Source of each Article - if needed, but not on this page atm - karl *}
{* {if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
<div class="NewsSummaryField">
{if $field->type == 'file'}
<img src="{$entry->file_location}/{$field->value}"/>
{else}
{$field->name}: {eval var=$field->value}
{/if}
</div>
{/foreach}
{/if} *}
</div>
{/foreach}
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</p>
{/if}
{else}
<h3>Sorry, there is no news to report at the moment.</h3>
{/if}
<!-- End News Display Template -->
But i would expect it to be something like:
Code: Select all
{if $itemcount > 0}
{*CODE FOR CATEGORY TITLE HERE???*}
<!-- Start News Display Template -->
{foreach from=$items item=entry}
<div class="NewsArchiveSummarywrap">
<div class="NewsSummaryLink">
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a>
</div>
{if $entry->postdate}
<span class="newsdate"> {$entry->postdate|cms_date_format}</span>
{/if}
{if $entry->summary}
<div class="NewsArchiveSummary">
<p>{eval var=$entry->summary|truncate:200}</p>
</div>
<div class="NewsArchiveMorelink">
<p><span class="bold"><a href="{$entry->moreurl}"{$entry->moreurl}">Read more</span></a></p>
</div>
{else if $entry->content}
<div class="NewsSummaryContent">
{eval var=$entry->content|truncate:50}
</div>
{/if}
{if isset($entry->extra)}
<div class="NewsSummaryExtra">
{eval var=$entry->extra}
{* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}
</div>
{/if}
{* this is for showing the Source of each Article - if needed, but not on this page atm - karl *}
{* {if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
<div class="NewsSummaryField">
{if $field->type == 'file'}
<img src="{$entry->file_location}/{$field->value}"/>
{else}
{$field->name}: {eval var=$field->value}
{/if}
</div>
{/foreach}
{/if} *}
</div>
{/foreach}
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</p>
{/if}
{else}
<h3>Sorry, there is no news to report at the moment.</h3>
{/if}
<!-- End News Display Template -->
Thanks in advance!
Karl.