Page 1 of 1

[solved] a way to separate News Items?

Posted: Wed Oct 22, 2008 10:40 pm
by holiday road
Is it possible to have a horizontal rule inserted automatically between news articles?
Currently they kinda appear one after the other, without any real separation between them.
they end up stacked on top of each other with no real way of telling where one starts and the previous story ends.

Re: a way to seperate News Items?

Posted: Fri Oct 24, 2008 2:17 pm
by SideshowBob
Hi,

There is probably a few ways to do this but take a look at the news templates. Just insert a hr tag where you'd like it.

Let me know if this isn't what you meant.

Bob

Re: a way to seperate News Items?

Posted: Sat Oct 25, 2008 12:28 am
by holiday road
hi Sideshow Bob,
thanks for your reply, i did try that... it only puts a horizontal rule 'inside' the news story.
what i need is a horizontal rule 'between' the news stories.
currently, the [more] tag of the newest story added sits directly above the date of the previous story.
example:

23/10/08
test news article 2
Category: General
Posted by: Admin
body of news article blah blah....
[More]
21/10/08
test article 1
Category: General
Posted by: Admin
body of news article 1 blaah.....

Re: a way to seperate News Items?

Posted: Sat Oct 25, 2008 9:33 am
by SideshowBob
Try this as your news summary template

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>
		<hr />

{else if $entry->content}

	<div class="NewsSummaryContent">
		{eval var=$entry->content}
	</div>
		<hr />
{/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 -->
Any good?

Bob

Re: a way to seperate News Items?

Posted: Sat Oct 25, 2008 9:58 pm
by holiday road
That's it!
Thanks Sideshow Bob.
Looks much better now, I also aded a before and after, just to separate it a bit more.
cheers
HR