PageFactory (Kirby Plugin)

PrevNextLinks()

prevnextlinks()

Renders two links, one to the next page, one to the previous page. Activates scripts to trigger on cursor keys ← (left) and → (right).

Classes:

  • .pfy-previous-page-link
  • .pfy-next-page-link
  • .pfy-show-as-arrows-and-textpredefined styles (apply to wrapperClass)
  • .pfy-show-as-top-arrowspredefined styles (apply to wrapperClass)

Use variables {{ pfy-previous-page-text }} and {{ pfy-next-page-text }} to define the text (visible and invisible parts).

Arguments

class
Class to be applied to the element (default: false)
wrapperClass
Class to be applied to the wrapper element. (default: false)
type
[links,head-elem] "links" returns a DIV to be placed inside page body. "head-elem" returns two <link> elements for the head section. (default: links)
option
[top,bottom] Defines which default class to apply. (default: bottom)

Example:

  <div class='page'>
    ...
    {{ PrevNextLinks() }}
  </div><!-- .page -->
</body>

→ Typically placed in template-file to be available on all pages.

HTML

<div class="pfy-page-switcher-links pfy-previous-page-link ">
    <a href='/KirbyDev/Doc/transvars/built_in_macros/nav'>
      <span class='pfy-page-switcher-arrow'>⟨</span>
      <span class='pfy-invisible'> to the next page</span>
    </a>
</div>
<div class="pfy-page-switcher-links pfy-next-page-link ">
    <a href='/KirbyDev/Doc/transvars/built_in_macros/reveal'>
      <span class='pfy-invisible'>to the previeous page </span>
      <span class='pfy-page-switcher-arrow'>⟩</span>
    </a>
</div>