Problem with {% from 'some_other_plugin_template.html' import some_function %}

Hi guys!

I hope everyone is doing well, given the circumstances…

Question:

Is it possible to use:

{% from 'some_other_plugin_template_inside_the_plugin_template_folder.html' import some_function %}

from inside a Plugin template?

I tried all kinds of combinations, and I’d always get jinja2.exceptions.TemplateNotFound

After debugging the code a bit, it looks like Jinja2’s loaders.py get_source() is searching only inside src/indico/web/templates, and I can’t figure out how to “force” it to also look inside my plugin’s template folder :frowning:

Thanks

Try pluginname:whatever.html to reference the other plugin’s template.

It worked!

You’re never wrong :slight_smile:

Thank you @ThiefMaster. I hope all is well with you! Stay safe!