I’d like to start trying to integrate existing apps like chat clients or ajax based utilities but believe in structuring my html correctly. I tested out the chat snippet based on phpfreechat and noticed that he called the entire class constructor within the actual html as opposed to placing script and css references within the head element which resulted in horror movie code.
The methodology I adopted for implementing moo.fx collapsable blocks was by placing a [+placeholderName+] within the context of the correct html section and then using setPlaceholder to pop the css and javascript ref’s where they should be.
What I’d like to know is this, how do you get a module or plugin to place code in the appropriate places since I’m going to have to require_once a couple of files and things without using placeholders for this?
Worst case scenario would be setting up a different template will all calls hardcoded but would like the flexibility that a plugin and module offer.
you can use a plugin and the event OnWebPagePrerender
Soda,
I had better luck using "OnWebPageInit".
Here is a link of where I used it:
http://modxcms.com/forums/index.php/topic,5712.msg41573.html#msg41573
Chuck