Package DE_EPAGES::Object::API::TLE::ObjectHandler
Functions
CHILD
Returns the child of an object by alias.
Syntax |
#FUNCTION("CHILD", #Parent, #Alias) |
Example |
#LOCAL("Child", #FUNCTION("CHILD", #Shop.ProductFolder.Object, "08/15")) #Child.NameOrAlias #ENDLOCAL |
Input |
|
EXISTSCHILD
Returns true if the child of an object exists.
Syntax |
#FUNCTION("EXISTSCHILD", #Parent, #Alias) |
Example |
#IF(#FUNCTION("EXISTSCHILD", #Object, "08/15")) #WITH(#FUNCTION("CHILD", #Object, "08/15")) <b>#NameOrAlias</b> #ENDWITH |
Input |
|
EXISTS_PATH
Returns true if given path exists at object.
Syntax |
#EXISTS_PATH(#Object, #Path) |
Example |
#EXISTS_PATH(#Shop, "Categories/Imprint") (imprint exists) #ENDIF |
Input |
|
Return |
|
INSTANCEOF
Returns true if object is instance of class given by name.
Syntax |
#FUNCTION("INSTANCEOF", #Object, #ClassName) |
Example |
#FUNCTION("INSTANCEOF", #Object, "Product") |
Input |
|
ISELEMENTOFPATH
Returns true if object part of the object PathObject. DE_EPAGES::Object::API::Object::Object::parentPath of Object is used to get all parent objects.
Syntax |
#FUNCTION("ISELEMENTOFPATH", #Object, #PathObject) |
Example |
#FUNCTION("ISELEMENTOFPATH", #Object, #Site) #FUNCTION("ISELEMENTOFPATH", #LeafCategory, #RootCategory) |
Input |
|
MULTISELECTEDVALUES
Returns a loop of all values of a multiple-selection attribute. For selected values the TLE #Selected is true.
Syntax |
#FUNCTION("MULTISELECTEDVALUES", #AllValues, #SelectedValues) |
Example |
#LOOP(#UserDefinedAttributeValues) #IF(#Attribute.Type EQ "PreDefMultiString" OR #Attribute.Type EQ "PreDefMultiLocalizedString" ) #LOCAL("SelectedValues", #FUNCTION("MULTISELECTEDVALUES", #Attribute.PreDefAttributes, #Value)) #LOOP(#SelectedValues) <input type="checkbox" name="#Attribute.Alias" value="#ID" #IF(#Selected)checked="checked"#ENDIF />#ValueOrAlias<br /> #ENDLOOP #ENDLOCAL #ENDIF #ENDLOOP |
Input |
|
Return |
|
PARENTPATH
Returns an array containing the objectId path for an objectId. DE_EPAGES::Object::API::Object::Object::parentPath of Object is used to get all parent objects. If the objectId path would be (1, 2, 3, 4, 5) and RootObjectId is 3, the return value would be (3, 4, 5).
Syntax |
#FUNCTION("PARENTPATH", #ObjectID, #RootObjectID) |
Example |
#FUNCTION("PARENTPATH", #Object.ID, #Site.ID) |
Input |
|
SORT
Sorts an array of objects by an attribute. The sort order is ascending by default. The sort criteria (numeric or alphabetically) depends on the type of the attribute. See also DE_EPAGES::Object::API::Factory::SortObjects.
Syntax |
#SORT(#Elements, #AttributeName) #SORT(#Elements, #AttributeName, #ReverseDirection) |
Example |
#LOOP(#SORT(#Products, "IsVisible")) #Alias - #IsVisible #ENDLOOP #LOOP(#SORT(#Products, "IsVisible", 1) #Alias - #IsVisible #ENDLOOP |
Input |
|
Return |
|