I am using the Tale Jade Yii renderer with Yii and it works great, except for modules.
I am setting the default view extension to ‘.jade’ and everything works with Yii::Application: if I have two view files like ‘account.php’ and ‘account.jade’, Yii will intelligently use the Jade version.
However, for modules, the behaviour is quite funky.
I am using Dektrium/yii2-user and I have setup the pathmap for the view component.
It works for php views, but when I change the overridden views to jade views, Yii rudely chooses to use the php versions from the user module…
If I create an empty view file in the Dektrium view folder, Yii suddenly chooses to respect my rules
I have ‘@common/views/profile/show.php’ and Yii does indeed use that instead of ‘@dektrium/user/views/profile/show.php’
When I change ‘@common/views/profile/show.php’ to ‘@common/views/profile/show.jade’ I would expect Yii to use that, but it doesn’t.
So, I create a completely empty show.jade and drop it in ‘@dektrium/user/views/profile/’ and it works - Yii uses my overridden jade view file.
Even if the original ‘show.php’ view file is present.
This must be a bug, right?