Sign in

Check post title in .hbs

  • This topic has 1 reply, 1 voice, and was last updated 3 years, 4 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1307
    Avatar photogpsblues

    Hi,

    I’m looking for a way to check the post title:

    `{{#each posts}}`
    `   {{#checkIf post.title ‘==’ “My Title”}}`
    `      … … …`
    `   {{/checkIf}}`
    `{{/each }}`

    post.title doesn’t work. Is there any way to do it?

    Thank you.

    #1308
    Avatar photogpsblues

    This is solution:

    `{{#each posts}}`
    `   {{#checkIf title ‘==’ “My Title”}}`
    `      … … …`
    `   {{/checkIf}}`
    `{{/each}}`

    it didn’t work because the post was hidden 🙁

    `{{#each hiddenPosts}}`
    `   {{#checkIf title ‘==’ “My Title”}}`
    `      … … …`
    `   {{/checkIf}}`
    `{{/each}}`

    Ciao

     

     

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.