Skip to main content
1 of 2
Sarah C
  • 490
  • 3
  • 19

I think you can do some cool things when you set classes. A colon : indicates 'else'.

{%
  set classes = [
    item.is_expanded ? 'is-expanded' : 'not-expanded',
    item.is_collapsed ? 'is-collapsed' : 'not-collapsed',
    item.in_active_trail ? 'active',
    item.below ? 'has-children': 'no-children
  ]
%}
Sarah C
  • 490
  • 3
  • 19