#LOCAL("Orientation","LeftRight")
#IF((#NavBarElement.NavBar.ID == #System.Child.NavBars.Child.Left.ID OR #NavBarElement.NavBar.ID == #System.Child.NavBars.Child.Right.ID)
OR (#INPUT.NavBarAlias EQ "Left" OR #INPUT.NavBarAlias EQ "Right"))
#SET("Orientation","UpDown")
#ENDIF
#BLOCK("CachedInclude", #Shop.Categories.Object, "SF.DropDownListUpDown" . #CacheIncludesNames)
#WITH(#Shop.Categories)
#LOCAL("OuterObjects", #ContentObjectsInNavigation)
#IF(#COUNT(#OuterObjects))
#LOOP(#OuterObjects)
#LOCAL("ViewNotAllowed", NOT #FUNCTION("ISACTIONALLOWED", "View"))
-
#LOCAL("StoreRootLayoutIconSet", #System.StoreRoot . "/" . #Style.LayoutIconSet)
#IF(#Class.Alias EQ "Link")
#IF(#DEFINED(#URL))
#NavigationString#IF(#ViewNotAllowed)
#ENDIF
#ELSE
#NavigationString#IF(#ViewNotAllowed)
#ENDIF
#ENDIF
#ELSE
#LOCAL("ViewFacet",0)
#IF( #Shop.FacetedSearchStartDepth AND #CategoryPathDepth >= #Shop.FacetedSearchStartDepth AND (NOT #ViewNotAllowed) AND #HasVisibleProduct(#ID))
#SET("ViewFacet",1)
#ENDIF
#NavigationString#IF(#ViewNotAllowed)
#ENDIF
#ENDLOCAL
#ENDIF
#ENDLOCAL
#IF(#COUNT(#ContentObjectsInNavigation) > 0 AND NOT #ViewNotAllowed)
#INCLUDE("INC-DropDownListSubCategories")
#ENDIF
#ENDLOCAL
#ENDLOOP
#ENDIF
#ENDLOCAL
#ENDWITH
#ENDBLOCK
#ENDLOCAL