Offsetting some news items

Post

Posted
Rating:
#4710 (In Topic #950)
Is it possible to offset the news items displayed by the main_news block? I want to use both the main_image_fader_news and the  main_news block on a homepage. My intention is for the fader block to carry the latest 5 news items and the main_news block to carry the next 10 latest news items, offsetting the "most" latest 5. Is there some way this can be done -- without some extra PHP?

Post

Posted
Rating:
#4711
Hi,

I was going to say it's not possible, but then I realised you could use Filtercode and Tempcode.

Code

{$BLOCK,block=main_news,filter=date_and_time<{$SUBTRACT,{$FROM_TIMESTAMP},604800},fallback_full=10,fallback_archive=0,days=0}

604800 is 1 week in seconds

Post

Posted
Rating:
#4712

Code

{$BLOCK,block=main_news,filter=date_and_time&amp;amp;amp;amp;lt;{$SUBTRACT,{$FROM_TIMESTAMP},604800},fallback_full=10,fallback_archive=0,days=0}&amp;amp;amp;lt;br /&amp;amp;amp;gt;604800 is 1 week in seconds

It seems to work – I have just 5 article currently, so it just displays There is no news yet for now.
I had to paste the code in "view source" mode for it to work as the whole news items were displayed normaily, when I pasted the code in the normal editor mode.
Thanks
0 guests and 0 members have recently viewed this.