Hello, is there a way to extend a module template file in the theme ?
Because when I try to extend
"{extends file='module:my_module/views/templates/front/view.tpl'}"
I have obviously an infinite recursive call.
we need something like :
{extends file='parent:module:my_module/views/templates/front/view.tpl'}
or
{extends file='parent_module:my_module/views/templates/front/view.tpl'}
Or another way to extends a module template without having an infinite recursive loop.
Thank you.
Thanks for opening this issue! We will help you to keep its state consistent
Hello,
Please be aware that this bug tracker should be used to report issues only.
If you need help, you can ask on the :
Thanks for your understanding!
It looks like this is a real issue. It's possible to _override_ a complete module template, but not to _extend_ it.
According to the documentation, you can override any module template just by redefining it in the theme by convention. But you cannot _extend_ it, because in order to extend it you need to use {extends file='module:my_module/views/templates/front/view.tpl'}, and since the module: namespace will reference the file from the theme instead of the module's, this will result in an infinite loop.
We'd need a special namespace like parent:module or something like that.
We definitively need this, thanks. We have infinite loops too.
Currently, the only way to avoid infinite loop is to use {extends file='modules/MODULE_NAME/...'} in your theme. I agree with @eternoendless, it would be better to have special namespace like parent: for child themes.
Most helpful comment
It looks like this is a real issue. It's possible to _override_ a complete module template, but not to _extend_ it.
According to the documentation, you can override any module template just by redefining it in the theme by convention. But you cannot _extend_ it, because in order to extend it you need to use
{extends file='module:my_module/views/templates/front/view.tpl'}, and since themodule:namespace will reference the file from the theme instead of the module's, this will result in an infinite loop.We'd need a special namespace like
parent:moduleor something like that.