You are here

prevnext.html.twig in Prevnext 2.0.x

Same filename and directory in other branches
  1. 8 templates/prevnext.html.twig
  2. 2.x templates/prevnext.html.twig

prevnext.html.twig Default theme implementation to the prevnext indicator.

Available variables:

  • direction: "previous" or "next"
  • text: The translated text for "Previous" or "Next"
  • nid: The node NID of the destination link
  • url: A formatted absolute URL for the path /node/$nid
  • void: A flag indicating wether this element should be completelly skipped. TRUE means there is no available $nid.

File

templates/prevnext.html.twig
View source
  1. {#
  2. /**
  3. * @file prevnext.html.twig
  4. * Default theme implementation to the prevnext indicator.
  5. *
  6. * Available variables:
  7. * - direction: "previous" or "next"
  8. * - text: The translated text for "Previous" or "Next"
  9. * - nid: The node NID of the destination link
  10. * - url: A formatted absolute URL for the path /node/$nid
  11. * - void: A flag indicating wether this element should be completelly skipped. TRUE means there is no available $nid.
  12. *
  13. */
  14. #}
  15. {% if not void %}
  16. <div id="prevnext-{{ direction }}" class="prevnext-element {{ direction }}">
  17. <a href="{{ url }}">{{ text }}</a>
  18. </div>
  19. {% endif %}