omeka / omeka-s

Omeka S is a web publication system for universities, galleries, libraries, archives, and museums. It consists of a local network of independently curated exhibits sharing a collaboratively built pool of items, media, and their metadata.
GNU General Public License v3.0
403 stars 135 forks source link

Implemented module page template and module block template #2200

Closed Daniel-KM closed 4 months ago

Daniel-KM commented 4 months ago

The possibility to create multiple templates for blocks is very practical. There is just a last point: let modules create templates too. For example a module can implement a specific template for browse preview, whatever the theme is.

This feature is implemented in the new version of the module BlockPlus, but it should be usable by any module.

Technically, i prefered to inject the module templates (a list of key-value pairs for path/label) inside the theme data because it is the simplest way, but it can be done in a heavy way.

zerocrates commented 4 months ago

Thanks. Letting modules provide these across all themes seems like a fine idea.

I did merge this, though one thing does occur to me now: you're merging the module templates into the theme's config... should it be the other way around, just a flipping of the arguments to array_merge_recursive? We often have themes be the highest-priority override.