Help with news module! [SOLVED]

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
lprintz
Forum Members
Forum Members
Posts: 76
Joined: Thu Jun 19, 2008 5:59 pm

Help with news module! [SOLVED]

Post by lprintz »

Hello all!

Something really funky is going on with my news module.

I have it set up so the summary only shows the date and title but 2 of my articles are showing the ENTIRE article in the summary. Please note the 8/9/2009 article - http://www.attorneygaudreau.com/gaudreau-news.html

I hid the other article as it was blowing up the teasers on the home page.

What blows my mind is why would most of the articles appear fine except for these 2? I looked at the article setup and nothing stands out.

I hope someone has experienced this and has a solution. I've pasted my summary code below.

Thanks so much!

Len


<!-- Start News Display Template -->
{if $pagecount > 1}
<!--<p>
{if $pagenumber > 1}
{$firstpage}&nbsp;{$prevpage}&nbsp;
{/if}
{$pagetext}&nbsp;{$pagenumber}&nbsp;{$oftext}&nbsp;{$pagecount}
{if $pagenumber < $pagecount}
&nbsp;{$nextpage}&nbsp;{$lastpage}
{/if}
</p>-->
{/if}
{foreach from=$items item=entry}
<div class="NewsSummary">

{if $entry->postdate}
<div class="NewsSummaryPostdate">
{$entry->postdate|cms_date_format}
</div>
{/if}

<div class="NewsSummaryLink">
<strong>{$entry->title|cms_escape}</strong>
</div>

<!--<div class="NewsSummaryCategory">
{$category_label} {$entry->category}
</div>

{if $entry->author}
<div class="NewsSummaryAuthor">
{$author_label} {$entry->author}
</div>
{/if}-->

{if $entry->summary}
<!--<blockquote>
{eval var=$entry->summary}
</blockquote>-->

<div style="padding-bottom:10px;" class="NewsSummaryMorelink">
[{$entry->morelink}]
</div>

{else if $entry->content}

<blockquote>
{eval var=$entry->content}
</blockquote>
{/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}:&nbsp;{eval var=$field->value}
{/if}
</div>
{/foreach}
{/if}

</div>
{/foreach}
<!-- End News Display Template -->
Last edited by lprintz on Tue Apr 05, 2011 5:40 pm, edited 1 time in total.
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Help with news module!

Post by Wishbone »

You set your template to show the content if there is no summary. What's the difference in the Summary field between an article that looks fine and the bad one? Turn of WYSIWYG if they both look blank.

If you don't want to show the summary (commented out) or the content (not commented out), it would be best to just remove that whole section from your template, and you can't have the issue that you're seeing.

remove:

Code: Select all

{if $entry->summary}
<!--<blockquote>
{eval var=$entry->summary}
</blockquote>-->
keep:

Code: Select all

<div style="padding-bottom:10px;" class="NewsSummaryMorelink">
[{$entry->morelink}]
</div>
remove:

Code: Select all

{else if $entry->content}
<blockquote>
{eval var=$entry->content}
</blockquote>
{/if}
lprintz
Forum Members
Forum Members
Posts: 76
Joined: Thu Jun 19, 2008 5:59 pm

Re: Help with news module!

Post by lprintz »

Thanks so much!

As some of the articles have summaries I simply placed a period. Kinda clunky but at least I understand now what's going on :)

Len
Post Reply

Return to “CMSMS Core”