Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

Hi i am working on gui extension want to add some jquery libraries but it is not loading in the cme ,CME got Crashed,i am using jquery and jqery ui js

i have this config

 <cfg:group name="Extension.Counter" merger="Tridion.Web.UI.Core.Configuration.Resources.CommandGroupProcessor" merge="always">
        <cfg:fileset>
         <cfg:file type="style">/Extrensions/Editors/jquery-ui.structure.css</cfg:file> 
         <cfg:file type="style">/Extrensions/Editors/jquery-ui.theme.css</cfg:file> 
         <cfg:file type="style">/Extrensions/Editors/jquery-ui.css</cfg:file> 
         <cfg:file type="script">/Extrensions/Editors/jquery-ui.js</cfg:file>
         <cfg:file type="style">/Extrensions/Editors/Counter.css</cfg:file>
         <cfg:file type="script">/Extrensions/Editors/jquery.js</cfg:file>
        <cfg:file type="script">/Extrensions/Editors/Counter.js</cfg:file>
          <cfg:file type="reference">Extrensions.Editors.Counter</cfg:file>
        </cfg:fileset>
        <cfg:dependencies>
          <cfg:dependency>Tridion.Web.UI.Editors.CME</cfg:dependency>
          <cfg:dependency>Tridion.Web.UI.Editors.CME.commands</cfg:dependency>
        </cfg:dependencies>
   </cfg:group>

What can be the reason to fail CME loading....why it is not loading js files and css for jquery ui if any one implemented same js in there Extensions please help thanks in advance

share|improve this question
    
    
how to use jquery plugin libraries with Tridion,is there any way please suggest the above link shows prob occurred but not giving solution –  Pankaj786 Aug 25 at 11:55
    

2 Answers 2

up vote 2 down vote accepted

The order of your files in your <cfg:fileset /> element completely matters. This means you'll want to put the files that are used by the other resources at the top of your list. In your example, jQuery UI comes first, then jQuery... I'd imagine this would throw an error so you'd probably want to make sure that jQuery comes first.

Secondly you'll want to make sure you are adding your libraries correctly. See http://tridion.stackexchange.com/a/1689/9 for reference, you'll want to make sure you are dong something like window.$jq = jQuery.noConflict(true);. You'll also want to ensure that you are passing your $jq global to the jQuery UI library as well.

If you are still having issues after that, make sure to check the console log... you might get a better clue for debugging the issue.

Hope that helps!

share|improve this answer
<cfg:file type="reference"Extrensions.Editors.Counter</cfg:file>

<cfg:file type="reference">Extrensions.Editors.Counter</cfg:file>

Missing the closing tag after reference ?

Second. I wouldn't recommend you to use all those jquery libraries, they make the system slower.

share|improve this answer
    
then how to use the plugin code here is there any thing like bundling and minification in TRdion like in asp.net mvc –  Pankaj786 Aug 25 at 11:53
    
jarnohenneman,Sorry but <cfg:file type="reference">Extrensions.Editors.Counter</cfg:file> is not issue may be i pasted wrong text now evry thing is right –  Pankaj786 Aug 25 at 11:54
    
@Pankaj786 bundling and minification is automatically done for all the files in your fileset. But I think what Jarno ment was that you are adding a very heavy library (JQuery and JQuery UI) to your extension and you might want to consider not ding that. I'll add a comment about that to your main question, so you can edit the question and add the answer in there. –  Bart Koopman Aug 25 at 12:58
    
I presume the typo is 'known' /Extrensions/ should it not be /Extensions/ –  Dylan .. Mark Saunders Aug 25 at 21:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.