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.

Add <link rel="next" ...> and <link rel="prev ..> on paginated pages

November 03, 2011 3:04pm

Subscribe [5]
  • #1 / Nov 03, 2011 3:04pm

    Victoriaz

    19 posts

    Hi

    All of my paginated pages need to have code inserted into them to indicate their page numbers in relation to their series.

    On the first page, I’d like to include in the <head> section:
    <link rel=“next” href=“http://www.zzinsider.com/article?story=abc&page=2” />

    On the second page:
    <link rel=“prev” href=“http://www.zzinsider.com/article?story=abc&page=1” />
    <link rel=“next” href=“http://www.zzinsider.com/article?story=abc&page=3” />

    etc.

    This is in context with this article from google: http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+blogspot/amDG+(Official+Google+Webmaster+Central+Blog)

    Any ideas how to do this on EE2? Thanks a lot

  • #2 / Nov 04, 2011 4:30am

    John Henry Donovan

    12339 posts

    Hi Victoriaz,

    Moving to Community Help as more appropriate there

    What limit are you putting on your channel:entries tag

    Depending on this your pagination in your URL would look lie P4, P8, P12 etc

    You could pull this in with PHP and associate it with page=1, page=2 etc

    That’s one route off the top of my head

    Maybe another community member might have another one for you

  • #3 / Nov 04, 2011 11:02am

    Victoriaz

    19 posts

    I have a limit of 10 per page.

    But I’m just not sure how to associate {paginate} to what I need. An example of code would help. Thanks

  • #4 / Aug 22, 2012 12:53pm

    james Brown

    492 posts

    Did you ever figure out a solution for this? I am having the same need.

  • #5 / Aug 22, 2012 3:52pm

    e-man

    1816 posts

    Maybe this add-on can help?
    http://devot-ee.com/add-ons/better-pagination

  • #6 / Aug 22, 2012 3:55pm

    james Brown

    492 posts

    not really…

  • #7 / Nov 14, 2014 10:56am

    Sy Andersohn

    8 posts

    I’ve created an addon for this which creates the rel next and prev links and works for my needs. This can be downloaded at https://github.com/ignetic/ee-pagination-rel-links .

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

ExpressionEngine News!

#eecms, #events, #releases