[Cheetahtemplate-discuss] call to a function in inherited templates
I'm using cheetah to build a rather complicated website. I import a lot of js and css files so I've devised a solution based on #blocks and #super directives to be able to import code specific to certain parts of thesite. Trouble with that is when you get deeper in the inheritance, you end up with #super copying the css declarations multiple times. I suppose this is a feature and nothing can really be done to make it work the way I would like, i.e. make Cheetah always copy only the css from the parent.
Then I've come up with a different solution. In my BaseTemplate class i defined a function which takes path to the css and adds it to a list. I have a block where I import files from the list in a loop. Problem again: in the generated writeBody my function call actually appears but the files don't ever make it to output. I suppose this is because the loop block is output before my css file can even be added to the list or writeBody doesn't get called at all, not sure which is the case.
Anyway, I presume this is a fairly standard use-case which must have already been solved by a lot of folks, so I don't wanna reinvent the wheel. I welcome all suggestions and help.
Thank you and regards,