You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @ireade thanks for the bug report. Good find, I'll betcha {{tags}} won't work either 😞
This is because when we fetch the next / prev post over the API, we do so with:
/api/posts/:id?include=prev or /api/posts/:id?include=next
Following this convention, if we want to include tags and authors in the response we'd need to tell the API to do that, something like:
/api/posts/:id?include=prev,prev.tags,prev.author or /api/posts/:id?include=next,next.tags,next.author
However, the API doesn't support this yet and I'm wondering if we ought to actually restructure this to be:
/api/posts/:id/prev?include=tags,author or /api/posts/:id/next?include=tags,author so that it's neater.
The difference between the first and the second version is the first fetches the main post (which we already have) along with it's next/previous post, where the latter would be more efficient and return only the requested post.
ErisDS
changed the title
Bug: {{author}} not showing up when using {{#prev_post}}{{/prev-post}} (Ghost 0.6.0)
Bug: {{author}} & {{tags}} not showing up when using {{#prev_post}} or {{#next_post}}
May 26, 2015
closesTryGhost#5150
- Post API understands next.author, next.tags, previous.author and previous.tags
- Post Read request filters out those properties and does the right thing with them
- Prev/Next post helpers send extra include properties
- Tests updated
Issue Summary
In my post.hbs, I wrote -
Everything but the {{author}} was outputted.
Technical details
The text was updated successfully, but these errors were encountered: