Hi all,
I started a thread on the Product Support section and been advised that I really should go here.
News Module - details page only shows one article http://forum.cmsmadesimple.org/index.ph ... 960.0.html
Can anyone advise on this?
News Module - details page only shows one article
Re: News Module - details page only shows one article
Can you post news detail template. Or PM temp admin login.
Re: News Module - details page only shows one article
I have attached the template. The only thing I have on the page is this:
Code: Select all
{news}
- Attachments
-
[The extension txt has been deactivated and can no longer be displayed.]
Re: News Module - details page only shows one article
News detail template is here "Content » News > Detail Templates". I guess you have only one - "Sample" template. post all of them if you have more templates.
Re: News Module - details page only shows one article
Only have one: sample
Code: Select all
{* set a canonical variable that can be used in the head section if process_whole_template is false in the config.php *}
{if isset($entry->canonical)}
{assign var='canonical' value=$entry->canonical}
{/if}
<div class="newscats">
{news browsecat="0"}
{news browsecat="1"}
</div>
{if $entry->postdate}
<div id="NewsPostDetailDate">
{$entry->postdate|cms_date_format}
</div>
{/if}
<h3 id="NewsPostDetailTitle">{$entry->title|cms_escape:htmlall}</h3>
<hr id="NewsPostDetailHorizRule" />
{if $entry->summary}
<div id="NewsPostDetailSummary">
<strong>
{eval var=$entry->summary}
</strong>
</div>
{/if}
<div id="NewsPostDetailContent">
{eval var=$entry->content}
</div>
{if $entry->extra}
<div id="NewsPostDetailExtra">
{$extra_label} {$entry->extra}
</div>
{/if}
<div id="NewsPostDetailPrintLink">
{$entry->printlink}
</div>
{if $return_url != ""}
<div id="NewsPostDetailReturnLink">{$return_url}</div>
{/if}
{if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
<div class="NewsDetailField">
{if $field->type == 'file'}
{* this template assumes that every file uploaded is an image of some sort, because News doesn't distinguish *}
<img src="{$entry->file_location}/{$field->value}"/>
{else}
{$field->name}: {eval var=$field->value}
{/if}
</div>
{/foreach}
{/if}
Re: News Module - details page only shows one article
hhmmmm, I just removed the
from that template and it works now. Is there a way to keep a list of articles on the details page?
Code: Select all
<div class="newscats">
{news browsecat="0"}
{news browsecat="1"}
</div>
Re: News Module - details page only shows one article
Try like this
If no luck - create new active, hidden page 'news_browsecat'
and in news detail template add
Code: Select all
{assign var='temp_save_actionid' value=$actionid}
<div class="newscats">
{news browsecat="0"}
{news browsecat="1"}
</div>
{assign var='actionid' value=$temp_save_actionid}
Code: Select all
{news browsecat="0"}
{news browsecat="1"}
Do not wory about ugly url - nobody will see that{fetch file="http://adikat.ie/index.php?page=news_browsecat&showtemplate=false&hl=$lang"}