On Thursday, March 15, 2018 at 8:20:09 PM UTC-5, Matthew Butterick wrote: > > > I see what you mean, though wouldn't `file->string` suffice? Here, we turn > the main template into a `pp` file so the Pollen commands therein get > executed. > > I hadn't considered that! I can't think of any reason why that method wouldn't work just as well.
> At an earlier stage in Pollen's life I implemented a special template > dialect that would allow templates to have templates. [..] It would've used > a different command character so the two rounds of Pollen commands would > stay distinct. > That's interesting, but the need to think in terms of "rounds of Pollen commands" is not clear to me. Whether using `include-template` or `file->string`, there is only one "round": the sub-template gets lifted into the current context and then evaluated right alongside everything else. Maybe I'm oversimplifying it though? > The case `in` makes for itself [1] is that it shortens a template like > this: > > Could you post a full working example as a gist or equiv so I can fiddle > with it? > Sure, here it is: https://gist.github.com/otherjoel/cde1aef9b582392efcdb12d74d65bf7c Predictably, GitHub doesn't allow me to change the name of the gist or the ordering of files, so the least relevant files are at the beginning and the most relevant one (template-index.html.p) is at the end. -- You received this message because you are subscribed to the Google Groups "Pollen" group. To unsubscribe from this group and stop receiving emails from it, send an email to pollenpub+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.