Catch event on all page types?

Permalink
Events::extendPageType('discussion_post', 'on_page_add');


If I want this to run on all page types in use, do I need to recreate it for each page type or can I leave the page_type blank and locate on_page_add function somewhere else

I can see there is another way to catch events, but this syntax is simpler. Can it be done though?

olliephillips
 
jankoehoorn replied on at Permalink Reply
jankoehoorn
There is a very hacky way, and that would be to alter the on_start method of the Controller class ;-)

But I can't imagine there isn't another, more sophisticated way.
JohntheFish replied on at Permalink Reply
JohntheFish
I find Mnkras' event tester really useful for this sort of thing.

http://www.concrete5.org/marketplace/addons/event-tester/...


Not just for the event logging, but because the help screen is the best documentation on C5 events I have yet found.

(which reminds me, I should write a review)
Mnkras replied on at Permalink Reply
Mnkras
Which then prompts me to say thank you :)

Thanks
Mike
Mnkras replied on at Permalink Reply
Mnkras
Oh, and to answer your question, just use the standard event extender with on_page_add as the event and it will apply to all pagetypes, (and also singlepages I believe)