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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.