Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
Does anyone know if there's a way of checking if a blocklist is null? I'm using it to create multi level navigation:
<div id="primary-menu-container" class="ds-mega-menu__container"> <div class="ds-container"> <ul class="ds-mega-menu__sub-menu ds-mega-menu__sub-menu--has-child-menus"> @Html.GetBlockListHtml(content.ChildLinks) </ul> </div> </div>
I want to hide this div if theres no child links
Thanks
Figured it out. You can use Count e.g. @content.ChildLinks.Count
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Check if Block List is null
Hi,
Does anyone know if there's a way of checking if a blocklist is null? I'm using it to create multi level navigation:
I want to hide this div if theres no child links
Thanks
Figured it out. You can use Count e.g. @content.ChildLinks.Count
is working on a reply...