Add index to collection sort TTW

Is it possible to add an index for "sort_on" of collections TTW? Maybe export an XML file, edit it and reimport it. (I need to be able to do it while in a meeting/demo with customer and I can not bring my own laptop)

I recently added a collection query field using this approach (via the registry control panel) on a Plone 5.2.3 site. It should work but best to try it first on your own laptop with the same Plone environment as your client.

Do you remember which record you edited (I tried searching for 'quierystring' but got 'loads of results'.

When defining the field, set the sortable attribute to True.

Example from p.a.querystring:

    <records interface="plone.app.querystring.interfaces.IQueryField"
             prefix="plone.app.querystring.field.getId">
       <value key="title" i18n:translate="">Short name (id)</value>
       <value key="description" i18n:translate="">The short name of an item (used in the url)</value>
       <value key="enabled">True</value>
       <value key="sortable">True</value>
       <value key="operations">
            <element>plone.app.querystring.operation.string.is</element>
       </value>
       <value key="group" i18n:translate="">Metadata</value>
    </records>
1 Like

thanks