#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 #LeafCategoryID)#SET("LeafCategory", #Shop.Categories.Object)#SET("LeafCategoryID", #Shop.Categories.ID)#ENDIF #BLOCK("CachedInclude", #LeafCategory, "SF.CategoriesListBox" . #CacheIncludesNames)
#ENDBLOCK #ENDLOCAL#ENDLOCAL