Mate Previous Next

Categories

Component ID

2452411

Component name

Mate Previous Next

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Mate Previous and Next

This module provides two functions to help to get the previous and next node of a given node.
This will help to provide navigation links for your site on each node.

Programatically

You have these two functions

  mate_prev_next_get_next($nid, $type);

and

mate_prev_next_get_prev($nid, $type);

Where

  • $nid = Node ID
  • $type = Name of the content type, e.g. page, blog, news, etc.

Type is optional, if is set will get prev and next nodes only from the same content type. If is not set
will get nodes from any content type.

Helper Block

This module provides a default block to get prev and next links without code, will get next and prev of
any content type. You can customize this template adding your own css or overriding the template in
your local theme.

Screen

Similar Projects

Similar project already available

https://www.drupal.org/project/prev_next
https://www.drupal.org/project/treewalk

prev_next does almost the same, has been build over a different logic, more complex, depends on extra tables, cron jobs and needs more complex configurations.
treewalk is more powerful, allows you to do more fancy things.

We bet in a simple approach, no extra configuration is needed, no dark magic to solve the previous and next node.

This module tries to follow the KISS philosophy.