ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Showing the next x number of entries

July 24, 2012 6:08pm

Subscribe [1]
  • #1 / Jul 24, 2012 6:08pm

    Dave Joyce

    49 posts

    On my channel entry page I’m trying to show the next 4 entries after the current one. And if the entries end, it loops around to the beginning again.


    I thought I was close with the Nearby Entries add on (http://devot-ee.com/add-ons/nearby-entries) but it doesn’t loop around to the beginning.

    Then I thought I was close with Advanced Prev Next add on (http://devot-ee.com/add-ons/advanced-prev-next-entry) but it doesn’t show more than 1 coming up.

    It seems like it’s a simple enough query that I shouldn’t need an addon. Any ideas?

    Thanks,

    -David

  • #2 / Jul 24, 2012 10:54pm

    Bhashkar Yadav

    727 posts

    Hi David,

    You can use offset and limit parameter of channel entry.

    like:

    {exp:channel:entries channel="channel_name" offset="2" limit="4"}
    {title}
    {/exp:channel:entries}

    I hope, it would help you.


    Thanks,

  • #3 / Jul 24, 2012 10:58pm

    Dave Joyce

    49 posts

    Thanks for the reply! That looks like a promising route, except I don’t know how many I should offset by with a given entry,

  • #4 / Jul 24, 2012 11:10pm

    Bhashkar Yadav

    727 posts

    Yes, that would be a trick.

    Could you please share a little about your template tag. how you are populating the channel data.

    For your hint, we can use first {count} from first channel loop within another channel as offset parameter.


    Thanks,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases