I’m new to MODx and starting to implement my first site with this CMS. I understand that MODx comes with built in support for the Prototype/Script.aculo.us JavaScript library. I plan on integrating come ajax functionality into my site and I’m trying to decide which JS library I want to use.
My question is can I remove Prototype/Script.aculo.us and replace it with something like the Yahoo YUI library or jQuery? Or does MODx depend on Script.aculo.us for some of it’s core functionality?
-
☆ A M B ☆
- 24,524 Posts
MODx does rely on its Prototype and Scriptaculous libraries, found in manager/media/script. However, you can put whatever you like in the assets/js folder and use that. A lot of people are using the Moofx libraries.
Yes, moo.fx was another one that I was considering, especially due to it’s simplicity and fact that it’s based off of Prototype.
I just want to keep the resource requirements as small as possible for quicker downloads, so I was wondering if I chose something else if I could remove Script.aculo.us or if I’d have to just add it in addition to Script.aculo.us.
Thank you for the reply!
-
☆ A M B ☆
- 24,524 Posts
Actually, you don’t need to load Scriptaculous and Prototype. The backend uses it (I believe), but it gets loaded in the front end automatically for QuickEdit. So the only time it gets loaded is if you are logged in as a manager user, and if you have the QuickEdit plugin enabled.
I’m successfully using moo.fx instead of prototype and scriptaculous, it has some issues but then again what doesn’t. Simply remove the calls to load the proto&scriptaculous libraries from your template and disable the quickedit plugin and then add the calls to moo.fx and you’re ready to roll.
Yeah, I have been using some moo.fx and ThickBox (based on jQuery) librairies, problems are some compatibility issues... (jQuery has a nice explanation of possible conflicts here :
http://jquery.com/docs/PrototypeAndJQuery/)
But the big drawback of dropping script.aculo.us is no QuickEdit, and for me that’s a big one...
<teaser>Luckily, you’ll have some new parser features handy to be able to load different scripts if you’re logged in and if you’re not with the upcoming release

That will allow front-end editors to have QuickEdit working when needed, and visitors able to enjoy the effects, how does that sound

?
</teaser>
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id