However, when these buttons are inside the {{contentFor}} block, the event listeners are deafs. I may be wrong on this, but maybe the template context changes when from one block to the other.
So, my question is, how can I keep the context of the myTemplate template inside the pageOptions region? Or, if it is possible, how can I pass the event listeners to region?
So, I have a couple of regions in my default layout that look like this:
In the page
pageOptions
region, I'm passing a block that contains two buttons:Both buttons have an
onClick
event associated:However, when these buttons are inside the
{{contentFor}}
block, the event listeners are deafs. I may be wrong on this, but maybe the template context changes when from one block to the other.So, my question is, how can I keep the context of the
myTemplate
template inside thepageOptions
region? Or, if it is possible, how can I pass the event listeners to region?Here are the packages I'm using: