using pollen to generate pollen templates
I have a project I'm working on that has three separate templates, all of which share certain elements but which are too different to elegantly handle with conditional code. So I figured I could generate a template by writing .pm source files for the derived templates. But, as far as I can tell, only the null extension and the preprocessor extension are really used for templates.
I got this to work for my scenario, but I pretty much just went in and started tinkering even though I have no real knowledge of the Pollen code base. Essentially, I added a
lozenge tag function (which inserts a lozenge character in the output), had the base template include the generated derived template via
◊(select* 'root doc). In the Pollen code base, I made the change in the patch which I have attached.
Would this break anything in the long run? Is there a way of handling this without patching Pollen? If this seems like a valid way of doing things, do I make a pull request?
only the null extension and the preprocessor extension are really used for templates.
Right, because otherwise Pollen needs to support templates for templates, which leads to some notational difficulties around the semantics of
As for your patch, it may fix a legitimate flaw, though I’d like to understand more precisely why the templates are ”too different to elegantly handle with conditional code”. Can you show a simplified example?
Deleting a branch is permanent. It CANNOT be undone. Continue?