Gazley Posted July 19, 2016 Share Posted July 19, 2016 Hi there, I'm hooking TemplateFile::render like so: $this->addHookAfter('TemplateFile::render', $this, 'hookRender'); In hookRender, I really need to know the filename that the template is based on. This is stored as a protected class field called 'filename' but with no getter available. Any ideas how to gain access to the filename in the circumstances I have described? Many thanks! Link to comment Share on other sites More sharing options...
tpr Posted July 19, 2016 Share Posted July 19, 2016 $event->object->filename should work I guess. 4 Link to comment Share on other sites More sharing options...
Gazley Posted July 19, 2016 Author Share Posted July 19, 2016 OMG, it does work! I must have assumed because there was no getter, that I couldn't access it. Thank you very much indeed Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now