Is it possible to make post.hbs with details of the post and for example related posts and have infinite scroll enabled? If so, what’s the ways to do that?
I have seen limitations of get and also throughout the forum everyone were standing for dynamic routing to implement something like this. But I couldn’t make it work with collections and channels either.
Because, it’s not a distinct route with collection of posts, every post should contain related posts, but as I understood, channels doesn’t affect url, but they also work for subset of data and specific url.
routes:
/apple-news/:
controller: channel
filter: tag:[iphone,ipad,mac]
routes:
/apple-news/{slug}/ // can't do smthing like this
controller: channel
filter: tag:[iphone,ipad,mac]
I have been using casper theme and infinitescroll.js.
Example of post.hbs:
...
{{#get "posts" limit="all" filter="id:-{{post.id}}+tag:{{post.primary_tag.slug}}" as |relative|}}
{{#foreach relative}}
{{/foreach}}
{{/get}}