@mbouzi (Malcolm) posted a new topic, subject "Section Pagination". It read:

   I'm attempting to paginate through a section, but I'm running into the error
    [code] 
        at <.Paginator.Pages>: error calling Pages: runtime error: invalid memory address or nil pointer dereference
        
    [/code]
    
    heres whats causing it  
    `{{ range where .Paginator.Pages "Section" "nav"}}{{end}}`
    
    I've tried this as well  
    `{{ $paginator := .Paginate (where .Site.Pages ".Params.class" "partner") 9}} {{ range $paginator.Pages }}`
    
    link to code: https://github.com/storj/tardigrade.io/blob/tard-apps/layouts/partials/apps/partners.html
    
    Any idea what section pagination might not be working in this case?

After which, @pointyfar added

    You are calling your pagination from a single.html layout. It is only available in list pages.

So @mbouzi (Malcolm) replied

    thank you!

After which, @system (system) added

    This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.


{'source': 'discourse', 'url': 'https://discourse.gohugo.io/t/section-pagination/24343', 'title': 'Section Pagination', 'views': 241, 'has_accepted_answer': True, 'word_count': 160, 'like_count': 0, 'reply_count': 1, 'participant_count': 2, 'posts': 4, 'tags': 'pagination', 'author': '@mbouzi (Malcolm)', 'participants': '@mbouzi (Malcolm), @pointyfar, @system (system)', 'image_url': [None], 'created_at': '2020-03-30T21:31:59.668Z', 'last_posted_at': '2020-04-02T15:22:19.175Z'}