Suppose that you have defined your enum element something like following:
Enum element->Article Enum value->2
Enum element->Image Enum value->5
Enum element->Folder Enum value->1
...
To convert the values from enum object to a array, you can first define a variable in your template, then access the enum object and assign values to the variable, and finally use this variable to filter fetching. Here is a example:
{let myarray=array() enumlist=$node.data_map.your_attribute_identifier.content.enumobject_list}
{section loop=$:enumlist}
{set myarray=$myarray|append($:item.enumvalue)}
{/section}
{let object_list=fetch(content,list,
hash(parent_node_id,
2,
class_filter_type, include,
class_filter_array,$myarray ) )}
{/let} {/let}
Regards, wenyue
You must be logged in to post messages in this topic!