#LOCAL("InputNavBarAlias", "")#IF(#DEFINED(#INPUT.NavBarAlias))#SET("InputNavBarAlias", #INPUT.NavBarAlias)#ENDIF #LOCAL("Orientation", "LeftRight")#IF(#InputNavBarAlias EQ "Left" OR #InputNavBarAlias EQ "Right") #SET("Orientation", "UpDown")#ENDIF #IF(#InputNavBarAlias EQ "" AND (#NavBarElement.NavBar.Alias EQ "Left" OR #NavBarElement.NavBar.Alias EQ "Right"))#SET("Orientation", "UpDown")#ENDIF #IF(#Orientation EQ "UpDown") #LOCAL("LeafCategoryID", 0)#LOCAL("LeafCategory", 0) #IF(#INSTANCEOF(#Object, "Product"))#SET("LeafCategory", #MainCategory.Object)#SET("LeafCategoryID", #MainCategory.ID) #ELSIF(#INSTANCEOF(#Object, "ContentObject"))#SET("LeafCategory", #Object)#SET("LeafCategoryID", #ID)#ENDIF #IF(NOT #LeafCategory)#SET("LeafCategory", #Shop.Categories.Object)#SET("LeafCategoryID", #Shop.Categories.ID)#ENDIF #BLOCK("CachedInclude", #LeafCategory, "SF.CategoriesTreeBox" . #CacheIncludesNames) #LOCAL("NavBarElementID",#NavBarElement.ID)#LOCAL("ViewObjectCategoryPath",#Path) #LOOP(#Categories)#IF(#ItemNo == 0)#SET("ViewObjectCategoryPath",#Path)#ENDIF#ENDLOOP #WITH(#Shop.Categories) #LOCAL("OuterObjects", #ContentObjectsInNavigation)#IF(#COUNT(#OuterObjects)) #IF(#INPUT.IsEditorModeEnabled AND #INPUT.IsEditorNavElements OR #INPUT.IsEditorModeEnabled) #REM Styles needed for 1st MBO embed of the element #ENDREM #ENDIF #IF(#COUNT(#Shop.Categories.ContentObjectsInNavigation) > 0) #ENDIF #ENDIF#ENDLOCAL#ENDWITH#ENDLOCAL #ENDLOCAL#ENDBLOCK#ENDLOCAL#ENDLOCAL #ELSE #LOCAL("LeafCategoryID", 0)#LOCAL("LeafCategory", 0) #IF(#INSTANCEOF(#Object, "Product"))#SET("LeafCategory", #MainCategory.Object)#SET("LeafCategoryID", #MainCategory.ID) #ELSIF(#INSTANCEOF(#Object, "ContentObject"))#SET("LeafCategory", #Object)#SET("LeafCategoryID", #ID)#ENDIF #IF(NOT #LeafCategory)#SET("LeafCategory", #Shop.Categories.Object)#SET("LeafCategoryID", #Shop.Categories.ID)#ENDIF #BLOCK("CachedInclude", #LeafCategory, "SF.CategoriesTreeBox" . #CacheIncludesNames) #LOCAL("NavBarElementID",#NavBarElement.ID)#LOCAL("ViewObjectCategoryPath",#Path) #LOOP(#Categories)#IF(#ItemNo == 0)#SET("ViewObjectCategoryPath",#Path)#ENDIF#ENDLOOP #WITH(#Shop.Categories) #LOCAL("OuterObjects", #ContentObjectsInNavigation)#IF(#COUNT(#OuterObjects)) #IF(#INPUT.IsEditorModeEnabled AND #INPUT.IsEditorNavElements OR #INPUT.IsEditorModeEnabled) #REM Styles needed for 1st MBO embed of the element #ENDREM #ENDIF #IF(#COUNT(#Shop.Categories.ContentObjectsInNavigation) > 0) #ENDIF #ENDIF#ENDLOCAL#ENDWITH #ENDLOCAL#ENDLOCAL#ENDBLOCK #ENDLOCAL#ENDLOCAL #ENDIF#ENDLOCAL#ENDLOCAL