简体   繁体   中英

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

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>

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM