Wrapped primary-tag get helper with if (#383)
closes #382 - If there is no primary tag, the filter will be invalid syntax - This wraps the if helper and gets rid of errors in the logs
This commit is contained in:
parent
ca325285bf
commit
d92dda3523
3
post.hbs
3
post.hbs
|
@ -101,7 +101,7 @@ into the {body} of the default.hbs template --}}
|
||||||
<aside class="read-next outer">
|
<aside class="read-next outer">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<div class="read-next-feed">
|
<div class="read-next-feed">
|
||||||
|
{{#if primary_tag}}
|
||||||
{{#get "posts" filter="tags:{{primary_tag.slug}}+id:-{{id}}" limit="3" as |related_posts|}}
|
{{#get "posts" filter="tags:{{primary_tag.slug}}+id:-{{id}}" limit="3" as |related_posts|}}
|
||||||
{{#if related_posts}}
|
{{#if related_posts}}
|
||||||
<article class="read-next-card"
|
<article class="read-next-card"
|
||||||
|
@ -132,6 +132,7 @@ into the {body} of the default.hbs template --}}
|
||||||
</article>
|
</article>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/get}}
|
{{/get}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{!-- If there's a next post, display it using the same markup included from - partials/post-card.hbs --}}
|
{{!-- If there's a next post, display it using the same markup included from - partials/post-card.hbs --}}
|
||||||
{{#next_post}}
|
{{#next_post}}
|
||||||
|
|
Loading…
Reference in New Issue