How to change http headers from a module
Posted: Fri Jun 22, 2007 10:25 am
I am creating a simple module that needs to set a cookie on the user's browser. This obviously needs to be done before cmsms starts sending content, so cant be done (elegantly) from a {cms_module ...} tag.
How can I create a hook that gets called early on in cmsms execution? So far the best place I have found is the module callback function TemplatePreCompile(). Is that my best bet, or is there a "better" hook?
Also, how do you make your module respond to certain Events? I have read examples that show how to create custom Events, but not on how to respond to events.
How can I create a hook that gets called early on in cmsms execution? So far the best place I have found is the module callback function TemplatePreCompile(). Is that my best bet, or is there a "better" hook?
Also, how do you make your module respond to certain Events? I have read examples that show how to create custom Events, but not on how to respond to events.