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.

"Finding" the first post in a weblog

July 06, 2009 11:25pm

Subscribe [2]
  • #1 / Jul 06, 2009 11:25pm

    Hi,

    I want to use next/prev linking in a portfolio section I’m building, which means my template needs to be a single entry page.

    I don’t want to hard-code my navigation link to the first entry. So how would I go about ‘finding’ the first entry in a particular weblog and redirecting to it so I get the next/prev links working?

  • #2 / Jul 06, 2009 11:48pm

    Worked it out by combining a redirect and the Entries List plugin by Laisvunas.

    {exp:entries_list category="5" weblog="portfolio" sort="desc" limit="1"}
        {if segment_2 == ''}
          {redirect='graphicdesign/{url_title}/'}
        {/if}
    {/exp:entries_list}
  • #3 / Jul 07, 2009 12:15am

    Duh. I didn’t the plugin did I…

  • #4 / Jul 07, 2009 1:15am

    John Henry Donovan

    12339 posts

    Glad you were able to find a solution. Feel free to start a new thread if you have ay more questions.

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

ExpressionEngine News!

#eecms, #events, #releases