How can search labels in blogger post? with b:if?

126 Views Asked by At

I get an error when I use if else this way. My goal is to check if there is a value I want in the label.

<b:loop index='i' values='data:posts' var='post'>
  <b:if cond='data:post.labels in {"referans"}'>
    <b:include data='post' name='postCommentsAndAd'/>
  </b:if>
</b:loop>

1

There are 1 best solutions below

0
selcukctn On BEST ANSWER

this code worked.

<b:loop index='i' values='data:posts' var='post'>
                    <b:if cond='data:post.labels any (label => label.name == "referans")'>
                        <b:include data='post' name='postCommentsAndAd'/>
                    </b:if>
                  </b:loop>