Page 1 of 1
[Solved] News Module Stopped Working
Posted: Mon Nov 03, 2008 10:58 pm
by tina29
Hi there,
Recently installed CMS made simple, and have been modifiying the look and feel of the site. Now, the news module is not working. When I click on links, they are like the examples below, but do not actually load a page:
http://www.psychlosport.co.uk/index.php ... eturnid=39
I re-installed the newsmodule, and still have the same problem. Has anyone else experienced this, is it fixable?
Thanks
Tina
Re: News Module Stopped Working
Posted: Mon Nov 03, 2008 11:06 pm
by Nullig
Please post the news tag from your page template, so we can see what parameters you're sending and also post your news detail template.
Nullig
Re: News Module Stopped Working
Posted: Mon Nov 03, 2008 11:13 pm
by tina29
Hi Nullig,
My news summary template is as follows:
Code: Select all
<!-- Start News Display Template -->
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</p>
{/if}
{foreach from=$items item=entry}
<div class="NewsSummary">
{if $entry->formatpostdate}
<div class="NewsSummaryPostdate">
{$entry->formatpostdate}
</div>
{/if}
<div class="NewsSummaryLink">
{$entry->titlelink}
</div>
<div class="NewsSummaryCategory">
{$category_label} {$entry->category}
</div>
{if $entry->author}
<div class="NewsSummaryAuthor">
{$author_label} {$entry->author}
</div>
{/if}
{if $entry->summary}
<div class="NewsSummarySummary">
{eval var=$entry->summary}
</div>
<div class="NewsSummaryMorelink">
[{$entry->morelink}]
</div>
{else if $entry->content}
<div class="NewsSummaryContent">
{eval var=$entry->content}
</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}
{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}
<!-- End News Display Template -->
My detail template is:
Code: Select all
{if $entry->formatpostdate}
<div id="NewsPostDetailDate">
{$entry->formatpostdate}
</div>
{/if}
<h3 id="NewsPostDetailTitle">{$entry->title}</h3>
<hr id="NewsPostDetailHorizRule" />
{if $entry->summary}
<div id="NewsPostDetailSummary">
<strong>
{eval var=$entry->summary}
</strong>
</div>
{/if}
{if $entry->category}
<div id="NewsPostDetailCategory">
{$category_label} {$entry->category}
</div>
{/if}
{if $entry->author}
<div id="NewsPostDetailAuthor">
{$author_label} {$entry->author}
</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 Stopped Working
Posted: Mon Nov 03, 2008 11:15 pm
by tina29
You can click the link at:
http://www.psychlosport.co.uk/index.php
At the bottom of the page.
Thanks
Tina
Re: News Module Stopped Working
Posted: Mon Nov 03, 2008 11:17 pm
by Nullig
Can you post the call to the news module from your page template?
Do you have a separate page for detail news display?
Nullig
Re: News Module Stopped Working
Posted: Mon Nov 03, 2008 11:21 pm
by tina29
Here is the call:
Code: Select all
{* Start News *}
<div id="news">
<h2>News</h2>
{news number='3' detailpage='news'}</div>
{* End News *}
I was able to click on the link and see the detail of the newsarticle i had created. That has now gone...
Re: News Module Stopped Working
Posted: Mon Nov 03, 2008 11:26 pm
by Nullig
Do you have a page called "news"?
Nullig
Re: News Module Stopped Working
Posted: Mon Nov 03, 2008 11:29 pm
by tina29
Nullig,
Not that i'm aware of, at least, i havent specifically created one myself, it just stopped working where it was working before.
Is this 'missing' page the problem?
Tina
Re: News Module Stopped Working
Posted: Mon Nov 03, 2008 11:33 pm
by Nullig
Create a page called "News" with a page alias of "news", but uncheck the option to show it in the menu. In the content of the page just put:
{news}
Nullig
Re: News Module Stopped Working
Posted: Mon Nov 03, 2008 11:34 pm
by Nullig
Looks like you got it now.
Nullig
Re: News Module Stopped Working
Posted: Mon Nov 03, 2008 11:37 pm
by tina29
Nullig,
Yes, thanks for that! I created the page and it worked fine. Am I able to credit you for answering my question?
Much appretiated!
Tina
Re: [Solved] News Module Stopped Working
Posted: Mon Nov 03, 2008 11:39 pm
by Nullig
No need for credit - just glad to see you got it working.
Nullig