דריסת JavaScript של תוסף ברכיב ערכת נושא

Is this true of templates too?

Scenario: I want to override a template deployed in a plugin. But I want to override in a code controlled way.

So I tried to ship the new template in a theme component. The same file exists in a plugin (but is different).

This appears to work on my dev cloud install but not in a standard production install.

So is it fair to say that you can’t predict if this will be successful or not with templates? ie the asset pipeline is such that you can’t predict which ‘template’ will stick as there is no predefined or predictable precedence?

I have been working with some strange assumption that there was a hierarchy, something like:

  • core
  • plugin
  • theme component
  • local site changes

And if you placed a “file” with the same path and name in a later level of that hierarchy, it would override any “previous” definition.

But my assumption is probably not safe?

Is the only “packaged” solution (ruling out local site changes) therefore to fork the plugin and make the changes directly within it?

That would in some senses be a shame as it would increase the maintainance effort for customisations as you’d have to merge in changes to the main plugin repo periodically …