How to check two arguments inside {{#if}}

How do I check for OR within a handlebar? Example: {{#if @member.paid}} will check if the member is a paying member. This allows me to, for example:

{{#if @member.paid}}
Welcome back {{}}!

If I need to check member and member.paid using an if, how do I do that? For example:

{{#if @member.paid OR @member}}
Welcome back!

I have tried with OR and || without success. Do I need to wrap it differently?
I must be missing something or understanding it incorrectly.

Not sure if your example has been simplified too far but there’s no need for an OR there, {{#if @member}} covers both.

In general though, there is no OR functionality or further conditional/equality checks available.

Hi @Kevin and thanks for your answer. Good to know :slight_smile:

Would it perhaps be beneficial to be able to cover multiple arguments? I was mainly thinking, after reading a bit more on the subject, about something like this:

Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {

Making something like this useful:

{{#ifCond var1 '==' var2}}

If not, that’s fine too :slight_smile:

The exclusion of those type of helpers has been an intentional decision since the beginning of Ghost. Templates are meant to be logic free outside of the basic if and has and their opposite counterparts.