Sim
Well-known member
There is a template I want to insert additional data into whenever it is rendered, but it is never called directly - only ever via xen:include and from at least 6 different parent templates.
Is there a way of listening for this sub-template to be loaded and then execute my code to insert the additional data (which gets added to the sub-template via a template mod) ?
Currently I am extending each of the various view classes associated with the parent templates and inserting my data at the parent level, but it's the same code over and over again and it would be nice to only listen for the sub-template being rendered and have one set of code execute.
Is there a way of listening for this sub-template to be loaded and then execute my code to insert the additional data (which gets added to the sub-template via a template mod) ?
Currently I am extending each of the various view classes associated with the parent templates and inserting my data at the parent level, but it's the same code over and over again and it would be nice to only listen for the sub-template being rendered and have one set of code execute.