Mailing List Archive

Yet another way to extend html?
Hi, all!

There is a restriction here:
*With Jinja2, the content is produced in one step, with no possibility of
post-processing. The only way left to alter the generated content is to
perform these modifications dynamically on client-side using JavaScript. *
-- https://trac.edgewall.org/wiki/TracDev/PortingFromGenshiToJinja

Have you considered the option of inheriting a template with the same name?

Here is an implementation based on Jinja for Sphinx-doc:
*Templates with the same name in the templates_path override templates
supplied by the selected theme.*
-- https://www.sphinx-doc.org/en/master/development/templating.html

Another example is based on Django templates:
*A Django reusable app providing the overextends template tag, a drop-in
replacement for Django's extends tag, which allows you to use circular
template inheritance.*
-- https://github.com/stephenmcd/django-overextends

It seems like it is possible to extend/replace any block of any jinja-based
template with the same name by any trac-extension without client-side
rendering.

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/d34290b3-01d0-4ca8-896b-8a3d2a0edae3n%40googlegroups.com.