Pete Posted February 6, 2014 Share Posted February 6, 2014 Hi guys I'm sure I'm missing something really simple, but I'm trying to write a module that intercepts the page being edited and works out the template and other information for that page. I hook it in the module like this: $this->pages->addHookBefore('ProcessPageEdit::execute', $this, 'something); But then I'm not sure how to access what the page's template is. If I do the following then it gives me information about the ProcessPageEdit form and not the page being edited: $page = $event->object; I'm sure I've run into this before and resolved it before but I just can't find or remember the code. Link to comment Share on other sites More sharing options...
Soma Posted February 6, 2014 Share Posted February 6, 2014 $page = $event->object->getPage(); 8 Link to comment Share on other sites More sharing options...
Pete Posted February 6, 2014 Author Share Posted February 6, 2014 16 minutes - you were 1 minute over my guess as to how long it would take you to save the day Thanks Soma! Link to comment Share on other sites More sharing options...
Soma Posted February 6, 2014 Share Posted February 6, 2014 Hah, you were lucky I was even here atm 2 Link to comment Share on other sites More sharing options...
renobird Posted February 6, 2014 Share Posted February 6, 2014 I love how this happens. I run into something that I can't figure out, so I check the forum. Guess what? My question was asked and answered on the same day. Thanks guys. 3 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