{{ with $remoteProducts := activeProducts.HostList.Flatten }} {{ if or (gt (len $remoteProducts.Categories) 1) (gt (len $remoteProducts) 8) }} {{ template "html/layouts/system-menu/system-menu-modal" $remoteProducts }} {{ else }} {{ template "html/layouts/system-menu/system-menu-dropdown" (dict "Category" (index $remoteProducts.Categories 0) "Products" $remoteProducts) }} {{ end}} {{ else }} {{ template "html/layouts/system-menu/system-menu-dropdown" (dict "Category" localHost.Category )}} {{ end }}