get rid of macros.html in favor of xi:include'd snippets
|Reported by:||Owned by:||Remy Blank|
I needed a way to modify the generated list of attachments in 0.11. Currently the best way to do that seems to be to put a customized version of macros.html in a site's templates directory. I'd prefer not to fork that whole file for a minor change. What I'd rather do is override the macro definitions before they are called.
One solution to this is to add a site_macros.html file, similar to the site.html file used by layout.html. site_macros.html could be included by macros.html and allow a site to override and customize the macro. I've attached a patch to do that simple include.
Additionally, the current show_one_attachment() macro is nested in list_of_attachments() which makes it difficult to override. I've attached a second patch that reorganizes the macro definitions so you can override just show_one_attachment() by itself.
Either or both of these patches will make it easier to customize the output of the macros.
Change History (19)
comment:8 by , 10 years ago
|Summary:||[PATCH] Provide a cleaner way to override macros → get rid of macros.html in favor of xi:include'd snippets|