Q&A: I need to sort the portals entries with many categories - what’s the correct syntax?


I need to sort the portals entries and bring the items for multiple categories in the desired order. Doing this via the UMC works, but I need a CLI version with udm - what’s the correct syntax?


The syntax for setting the portals entries has changed to the content attribute (portalEntriesOrder is deprecated since Aug. 2018) and for the value a JSON object is needed to have the desired order. An example:

eval "$(ucr shell ldap/base)"
json_content=$(cat << END
udm settings/portal modify \
     --dn "cn=domain,cn=portal,cn=univention,${ldap_base}" \
     --set content="${json_content}"

Please note: The value of content has to be a valid JSON Object. You can check the syntax i.e. with https://www.jslint.com/

1 Like