TemplateOverride > Which plugin "wins"?

Hey there,
I have 2 pugins that both override the same template
$this->template->setTemplateOverride('board/table_column', ...

In order to make them work BOTH when installed on a kanboard-instance I am aware, that I can check for the existance of the other plugin and then provide a version of the new template that will incorporate the changes that both plugins need.

My question is:
Which plugin will “win” the overwrite? In my current case it seems to be that

“wins” OVER

because “DelegateTask” comes before “SortBoard …” (in the alphabet)

Is this assumption correct or will I have to change BOTH plugins to check for the existance of the other one and provide both with 2 templates for each case?

Looking forward to your answers,

doesn’t matter which one wins, because they are your plugins and you get to decide. you don’t need to create 2 templates for each, not to say that solution wouldn’t be one valid approach, but I wouldn’t do that. what you definitely need to do is account for the other, there are many ways to do this, so that’s up to you.

you can take a look at Group_assign and MetaMagik, these 2 plugins account for each other, and unify a model override. It’s one solution. Real simple, if both plugins exist, use a particular model, otherwise, use a different model. If that question rings true, there is only 1 model to use, so no you don’t need 2 models for each, just 1 extra model, but you need to ask the question in both, so that you can turn the override off on the other.

Another solution would be to use hooks, instead of overrides. since they are your plugins, you can add all the hooks you need. Or, make a PR to kanboard repo and add the hooks.