[SOLVED] Display only single news article

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
paperoffice
New Member
New Member
Posts: 6
Joined: Tue Mar 22, 2011 12:27 pm

[SOLVED] Display only single news article

Post by paperoffice »

My website have something like highlight area where are 3 sections to promote products etc. and i would like to display a single news article (summary text) each on them.
There is no need to display anything else than summarytext of each article.

I have published 3 news articles (article ids for example 1,2 and 3).

html:
...
<div id="container">
<div class="item">{news number="1"}</div>
<div class="item">{news number="2"}</div>
<div class="item">{news number="3"}</div>
</div>
...

How can i get a single news article on each div?

btw: {news number="x"} didn't work.
Last edited by paperoffice on Fri Apr 01, 2011 5:51 am, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Display only single news article

Post by RonnyK »

First,

I would solve this by modifying the summary-template, where then a loop could be used to give different classes within the foreach...

If you want it as you asked, then you can call {news} 3 times, with logic like....

{news number="1"}
{news number="1" start="1"}
{news number="1" start="2"}

Ronny
paperoffice
New Member
New Member
Posts: 6
Joined: Tue Mar 22, 2011 12:27 pm

Re: Display only single news article

Post by paperoffice »

Thanks, that did it!
Post Reply

Return to “CMSMS Core”