[SOLVED] Template name as variable


#1

I wonder if there’s a way of realizing this concept:

tplName='addPost'

Template.tplName.helpers
	...
Template.tplName.events
	...
Template.tplName.onCreated ->
	...
Template.tplName.onRendered ->
...

That would be really handy in my proj)


#2

Found the answer here

(Don’t remove my question, as it’s more clear of its purpose than the original topic with the answer)


#3
tplName='addPost'

Template[tplName].helpers
...

may also be what you’re looking for