We implemented Image Picker sort by date to show a lastModified column in image pickers, but it isn’t obvious which cms configuration to override to do the corresponding thing to documents.
Do we update
/hippo:configuration/hippo:frontend/cms/cms-folder-views/hippostd:folder/defaultColumns (and override DefaultListColumnProviderPlugin)?
If we didn’t want to override ALL document pickers and instead wanted to limit it to a specific document type/picker, how would we do that?
Yeah, it seems like so. One thing to note is that
org.hippoecm.frontend.plugins.cms.browse.list.DefaultListColumnProviderPlugin doesn’t add
lastmodified column by default, so you might need to copy some from
org.hippoecm.frontend.plugins.gallery.columns.ImageGalleryColumnProviderPlugin and adjust it for documents.
From the child node names under
/hippo:configuration/hippo:frontend/cms/cms-folder-views, it looks like the picker is determined by the folder node’s type. There is a chance you can easily add one more configuration for a custom folder node types, but I haven’t tried it. It will increase complexity as well.
Or, as it adds
org.hippoecm.frontend.plugins.standards.list.ListColumn instances for columns in the end, perhaps you can try to override
ListColumn#addCell(Item<ICellPopulator<T>>, String, IModel<T>) to display or not to display somehow?
It seems like quite an effort of customization.
One possible strategy is, if necessary, that you might want to consider generalizing the features with configuration options and contributing to the (community) hippo-cms project – CMS JIRA ticket and patch(es) – and ask for reviews and merge for future version. If accepted, you will be future-safe.
Just my two cents,