Set context of template method to layout instance
Merge pull request #427 from jugglinmike/template-context

Set context of template method to layout instance