Page 1 of 1

Navigator - What happened to {if $count > 0}

Posted: Wed Oct 24, 2018 10:06 am
by antibart
Hi,

in the old menu templates in vs. 1.x {if $count > 0} was used to query if there is any menu content.

In Navigator-templates it doesn't seem to work. So the wrapping <ul></ul> is left even if there isn't menu content.

I would bet there is an alternative for Navigator. Will anybody tell me? :)

Re: Navigator - What happened to {if $count > 0}

Posted: Wed Oct 24, 2018 12:13 pm
by calguy1000

Re: Navigator - What happened to {if $count > 0}

Posted: Wed Oct 24, 2018 1:38 pm
by antibart
Thanks. For visitors with the same temporarily ignorance as me I post a solution more directly:

Changing:

{if isset($nodes)}{strip}

to

{if isset($nodes) && $nodes|@count}{strip}