Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Trying to implement a simple category system #13

Open
richdrich opened this issue Jul 13, 2016 · 0 comments
Open

Trying to implement a simple category system #13

richdrich opened this issue Jul 13, 2016 · 0 comments

Comments

@richdrich
Copy link

Hi,

I'm trying to create a simple one-level category system with pagination. The content is data (being pulled in from Contentful).

I put the following stanza in config.rb:

activate :pagination do
   pageable_set 'cat_blog_pages' do
     data.blog.blog.blog_id.posts
   end

   pageable_set 'mouse_blog_pages' do
     data.blog.blog.blog_id.posts
   end
end

['mouse', 'cat'].each do |what|
  proxy "#{what}_blog_pages.html", "blog_pages.html",
        locals: { animal: what },
        pagination: { for: what, per_page: 2 },
        ignore: false
end

I get no pages being created/rendered (if I take out the proxy and render straight to blog_pages.html, it's fine).

I also looked at https://github.com/Aupajo/middleman-example-for-mkleywegt but couldn't strip it down to just what I need.

Any suggestions?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant