---
kind: partial
---
- this_ch = int(self.page.get('chapter', -1))
- previous_ch = find_page('chapter', this_ch - 1)
- next_ch = find_page('chapter', this_ch + 1)
.container.footer
  .row
    Previous
    - if previous_ch:
      = anchor_for_page( previous_ch )
  .row
    Next
      - if next_ch:
        = anchor_for_page( next_ch )
  .row
    Related
    %ul.related
      - for p in related(6):
        %li.related_page
          = anchor_for_page(p)
  .row
    Recent
    %ul.recent
      - for p in articles(6):
        %li.recent_page
          = anchor_for_page(p)
 
