You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using multiple viewsDirs and I need to confirm, that actual template targeting and rendering system in Phalcon works as intended.
I have 2 view dirs:
.../skins/my_skin/views/
.../frontend/views/
I would expect, as in other frameworks, that if I have template block/footer.volt under both directories, it will check for first existing template under views dirs and render it.
But current implementation in Phalcon works much different, it checks every time all directories and renders all templates found. So the most priority template is the last one and not the first one.
This is causing some performance overhead and it is causing problem when you want to render some partial, because it is rendered multiple times.
Hello,
I am using multiple viewsDirs and I need to confirm, that actual template targeting and rendering system in Phalcon works as intended.
I have 2 view dirs:
I would expect, as in other frameworks, that if I have template block/footer.volt under both directories, it will check for first existing template under views dirs and render it.
But current implementation in Phalcon works much different, it checks every time all directories and renders all templates found. So the most priority template is the last one and not the first one.
This is causing some performance overhead and it is causing problem when you want to render some partial, because it is rendered multiple times.
This for loop is causing the unexpected behavior
https://github.com/phalcon/cphalcon/blob/master/phalcon/mvc/view.zep#L665
Is this functionality intended? If not, then it is a major bug.
Replacing
https://github.com/phalcon/cphalcon/blob/master/phalcon/mvc/view.zep#L689
break for return null solves the problem.
The text was updated successfully, but these errors were encountered: