nystudio107 / craft-templatecomments

Adds a HTML comment with performance timings to demarcate `{% block %}`s and each Twig template that is included or extended.
https://nystudio107.com/
MIT License
20 stars 1 forks source link

[FR] Add support for {% include %} back into the plugin #43

Closed MangoMarcus closed 5 months ago

MangoMarcus commented 1 year ago

Question

Is there no support for comments when using {% include %} ?

This plugin works well for {% block %} but the description to me implies it would cover using {% include %}

Adds a HTML comment to demarcate each Twig template that is included or extended.

eg. using {% include '_foo/my-template' %} I'd expect something like

<!-- >>> INCLUDE BEGIN >>> _foo/my-template FROM _foo/other-template -->
<!-- * template output here * -->
<!-- <<< INCLUDE END <<< _foo/my-template FROM _foo/other-template TIME 1.23ms -->

Thanks!

khalwat commented 1 year ago

It used to do this, but I removed the feature when I updated it for Craft 4. I can leave this open as a FR to bring it back if you like?

MangoMarcus commented 1 year ago

That'd be great thank you

khalwat commented 5 months ago

Same as https://github.com/nystudio107/craft-templatecomments/issues/40

khalwat commented 5 months ago

1.2.1, 4.0.1, & 5.0.0 released with this FR added