After an accessibility check that a client run on her website, we are required to do some modifications on Plone's templates including the "folder contents" view.
I tried to create a different pattern (a shameless copy of structure pattern), register it as a new one, change the folder contents template to call the new pattern, but I don't manage to register the pattern correctly. The point seems that the structure pattern uses a "mockup-patterns-structure-url" "pattern" to point to a given folder in the mockup project and then the pattern loads the needed files (among others the paging.xml we want to change) from there.
Checking Plone's config.js generator I see that when registering the pattern in my registry.xml file I can use a "url" indicator to register the "mockup-patterns-mystructure-url", anyway I don't manage to load the pattern correctly.
I tried to understand if/how it would be possible to override/customize the structure pattern, but failed.
My goal is to reintroduce the add menu buttons, removed back in 2015: my instance does not show the standard Plone toolbar, so I'm looking for an alternative way to allow adding new contents from within the folder_contents view.
As @djowett said, it would be nice to have some hint on how to customize the pattern... without touching upstream source
Rebuild with plone-compile-resources. If you don't have that script in you buildout directory, you probably need a similar builtout part like this: buildout.coredev/core.cfg at fe814359200a8d38d5d5734730d6c322ac51c705 · plone/buildout.coredev · GitHub
Please note - if the output bundle does yet not exist, create an empty file. IIRC plone-compile-resources breaks if the bundle file which should be build does not yet exist.
In Plone 6 with ES6 and current Patternslib it's different. You cannot overwrite resources as with Plone 5.2 because there are no such registrations at all (which is a good thing except for the missing overwritability).
You can subclass a pattern. But then you have to provide a different name, because the pattern is already registered by just importing it.
I'm thinking forth and back, if this is a good thing or not. It's convenient, but it's also limiting. We could also bypass that with some Patternslib registry API methods to overwrite existing Pattern registrations.
Since such customizations are a valid use case in Plone I will come up with something.