Git Product home page Git Product logo

ee-pagination-seo's Introduction

Pagination SEO

For ExpressionEngine 3+

This extension enables you to add next and prev rel links to paginated pages. This creates HTML link elements with rel="next" and rel="prev" to indicate the relationship between component URLs in a paginated series. See: http://googlewebmastercentral.blogspot.co.uk/2011/09/pagination-with-relnext-and-relprev.html

To activate this extension, go to Addons > Extensions and click Install. Once installed you can change these settings:

  • Enable redirect to first page where pagination is not found
  • Page number prefix: add a prefix to page numbers in titles
  • Page number suffix: add a suffix to page numbers in titles
  • Display first page number in titles? i.e. Omit Page #1 in {pagination_seo:page_num} tag

Simply place the following tags within the HTML head area to output the full link tag:

{pagination_seo:prev} {pagination_seo:next}

An example output would be:

<link rel="prev" href="http://www.example.com/articles/P10" /> <link rel="next" href="http://www.example.com/articles/P30" />

Note: These tags can also be added to the settings within NSM Better Meta or SEO Lite addons.

You may also use the following tags to only output the URL and URI:

Outputs full link tags: {pagination_seo:prev} {pagination_seo:next}

Outputs pagination URI - Example: articles/P30 {pagination_seo:prev_uri} {pagination_seo:next_uri}

Outputs pagination URL: http://www.example.com/articles/P30 {pagination_seo:prev_url} {pagination_seo:next_url}

Displays the page number for use in browser titles and elsewhere: {pagination_seo:page_num}

These tags also work within NSM Better Meta fields

Other tags for unique content:

Configured page numbering to use within the title tag {pagination_seo:title}

Configured page numbering to use within the meta description tag {pagination_seo:description}

Extension Settings

  • Titles: add page numbering to paginated page titles. This can be configured with these variables: Available tags: {page_num} {total_pages} {total_items} Example configuration: " - Page {page_num}" Example use: <title>{title}{pagination_seo:title}</title> Example output: <title>My News Articles - Page 2</title>

  • Description: add page numbering to paginated page meta description. This can be configured with these variables: Available tags: {page_num} {total_pages} {total_items} Example configuration: "Page {page_num} of {total_pages} ({total_items} items) for " Example use: <meta name="description" content="{pagination_seo:description}{meta_description}" /> Example output: <meta name="description" content="Page 2 of 4 for My Articles" />

  • Display on first page? Enable this to show the Page Numbering on the first paginated page (default=No)

  • Enable redirect to first page where pagination is not found? This will help avoid out-of-range pagination problems which automatically redirects to the first page. i.e. where the url has P100 but pagination only goes up to P50

  • Store pagination strings to allow for cached pages (experimental) The problem exists where pagination rules cannot be accessed after they have been cached (with e.g. CE Cache) This attempts to circumvent this problem while still being able to display the pagination_seo tags

This extension uses the following hooks:

pagination_create template_post_parse

Installation

EE2: copy files to system/expressionengine/third_party/pagination_seo EE3+: copy files to system/user/addons/pagination_seo

ee-pagination-seo's People

Contributors

ignetic avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

stefcab

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.