Catch event on all page types?
PermalinkEvents::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?
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)
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)
Which then prompts me to say thank you :)
Thanks
Mike
Thanks
Mike
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)
But I can't imagine there isn't another, more sophisticated way.