Replies: 1 comment
-
Sounds like a reasonable feature. The default theme has to have some of those assets though. I suppose you could create a custom theme and then strip out the stuff you don't want? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
everettg_99 created Redmine issue ID 10101
We need the ability to unload any file slated for inclusion on a MODX page via the regClientCSS, regClientStartupScript, regClientScript, regClientHTMLBlock and related functions.
This is especially important when modifying behavior in the manager: otherwise it's too coupled with the built-in Ext JS files that some custom modifications become impossible.
One part of the solution is to uniquely identify loaded CSS and JS file with a stub rather than with the href. For example, if one Snippet loaded up the jQuery library, another Snippet could force the jQuery library to be loaded from a different source (e.g. a CDN).
For example, instead of just keying off of a simple integer (from the regClientStartupScript() function):
We should instead allow for a slug to identify the file being loaded:
That way you could easily call something like $modx->deregClientStartupScript('my-slug'); and have that script be unset from the array.
Without this functionality, modifying the MODX manager is nearly impossible in certain cases since these scripts are included by the core PHP classes (and not inside any template file).
See http://codex.wordpress.org/Function_Reference/wp_dequeue_script for comparison.
Beta Was this translation helpful? Give feedback.
All reactions