AND
The AND
condition can be implemented by stacking the b:if
's.
For example:
OR
The OR
on the other hand, is done by actually placing OR
operator, ||
, or the keyword or
within the b:if
condition.
For example, we want to show custom content or executing script
only on static page OR
item (post):
OR:
We can put more than two conditions for the OR
.
OR:
OR WE MIX THEM 😂
That actually works! But it will confuse yourself, thus I recommend to pick and consistently use either one, the pipes or the "or" keyword.
That also applies to AND
. We can stack them with more than two conditions.
Related Matters
In latest Blogger XML
, we can actually use the word or
for OR operation and and
for AND operation. This is a post about that.
For more reference regarding b:if
and b:else
, please try this post Blogger Conditional Tag — b:if and b:else.
Comments
Post a Comment