简体   繁体   中英

How hide “ section ” on blogger when no widget inside it

I need help Plz. I wanna hide section on blogger when no widget inside it.. or widget is invisble.. and I use this code.

<b:if cond='data:widgets.notEmpty'>
  <b:section id='box-one'/>
</b:if>

but not work for me.. any one have a solution

You can you this code:

<b:if cond='(data:widgets count w => w.sectionId == "box-one") > 0'>
  <b:section id='box-one'/>
</b:if>

where box-one is the section id

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