I'm using Ghost as blogging platform. When a user is reading a post I would like to show some related posts.
{{#foreach tags limit="1"}}
{{#get "posts" filter="tags:{{slug}}" limit="6" include="author,tags" as |article|}}
{{#foreach article}}
....
{{/foreach}}
{{/get}}
{{/foreach}}
I managed to get related posts, but I'm having issues deleting the current post from the results.
According to the Ghost Documentation I should be able to use this addition to the filter:
"+id:-{{post.id}}"
Like this:
{{#get "posts" filter="tags:{{slug}}+id:-{{post.id}}" limit="6" include="author,tags" as |article|}}
Unfortunately this is not working, {{post.id}} doesn't even prints out anything regardless the scope I am in. Simply using {{id}} instead of {{post.id}} I'm getting a value but it's the tags ID so that's not correct.
I managed to access my post ID inside the tag scope this way {{../id}} but I cannot use it in the filter this way, it's not working either.
Any idea on how to solve it would be appreciated.