How to modify the structure mockup pattern?

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.

There Plone is using the "structure" pattern from mockup to show the folder contents view, and specificaly we were requested to remove the last <ul> item because it is not a real list and convert it to some other HTML tag, this line:

How should we face it?

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.

Is this the right direction?

Any other hint will be appreciated :slight_smile:

Fix it in mockup!

Will do! PR is already in place:


Now I will try to create a plone.staticresources package build with the updated pattern to install it on the site.

1 Like

I'd be interested to know how would this should be done if the proper answer wasn't "fix it in mockup"....

as a general principle for overriding this pattern....


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 :smirk:

Plone Foundation Code of Conduct