Feature Request - Partial vs Include based on environment
Hi,
Per this documentation, there is better performance for include vs. partial. It'd be nice to be able to use partial in debug / test environments and include in production without doing something like the following everywhere in the code...
{% if devEnv == 'prod' %}
{% include "partials/footer.volt" %}
{% else %}
{{ partial("partials/footer") }}
{% endif %}
To something like the following which would do the above in one line. I messed around with trying to add a function to volt to do this, but I couldn't figure out how to reproduce include properly.
{{ envPartial("partials/footer") }}
Thoughts?
Thanks
Interesting ! I would very much like to see such a feature as well. Do we know how much impact using partial has on performances ?
Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalconphp.com/post/github-closing-old-issues