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.
[solved] a way to separate News Items?
-
- New Member
- Posts: 6
- Joined: Wed Oct 22, 2008 10:17 pm
[solved] a way to separate News Items?
Last edited by holiday road on Sat Oct 25, 2008 10:01 pm, edited 1 time in total.
-
- Forum Members
- Posts: 80
- Joined: Thu Sep 13, 2007 10:50 am
- Location: Bristol, UK
Re: a way to seperate News Items?
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
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
-
- New Member
- Posts: 6
- Joined: Wed Oct 22, 2008 10:17 pm
Re: a way to seperate News Items?
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.....
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.....
-
- Forum Members
- Posts: 80
- Joined: Thu Sep 13, 2007 10:50 am
- Location: Bristol, UK
Re: a way to seperate News Items?
Try this as your news summary template
Any good?
Bob
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 -->
Bob
-
- New Member
- Posts: 6
- Joined: Wed Oct 22, 2008 10:17 pm
Re: a way to seperate News Items?
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
Thanks Sideshow Bob.
Looks much better now, I also aded a before and after, just to separate it a bit more.
cheers
HR