We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29525
    • 388 Posts
    Jarnokk

    Thanks for sharing this. I would’ve thought this would help me out, but alas, I still get no list of templates in the pull down.

    What do you have in the plugin configuration tab in the custom parameters field?

      www.terrybarthdesign.com
      • 13585
      • 7 Posts

      Quote from: Terry at May 24, 2010, 05:23 PM

      What do you have in the plugin configuration tab in the custom parameters field?

      Only: forced_root_block : false ..learned that one from here btw smiley

      At some point there was also template_external_list_url: "/template_list.js" Now its hardcoded to template.js.. so i removed it.


      Setup / hack that i got:
      (modx: 1.0.3, tinymce: 3.3.2)

      Tools -> Configuration -> Interface & Features -> TinyMCE Settings
      Theme: Custom
      Custom Plugins: all other plugins,template
      Custom Buttons: all other buttons,template

      assets/plugins/tinymce/jscripts/tiny_mce/plugins/template/js/template.js

      LINE 5 - 10: (url to templatelist.file)
      var url = tinyMCEPopup.getParam("template_external_list_url"); <- NOT WORKING
      url = "http://dom.com/absolute_path_to/template_list.js"; <- FIX FOR THAT

      assets/plugins/tinymce/jscripts/tiny_mce/plugins/template/js/template_list.js

      var tinyMCETemplateList = [
      // Name, URL, Description
      ["Layout1", "http://dom.com/absolute_path_to/templates/tpl1.htm", "des1"],
      ["Layout2", "http://dom.com/absolute_path_to/templates/tpl2.htm", "des2"]
      ];

      assets/plugins/tinymce/jscripts/tiny_mce/plugins/template/templates/

      tpl1.htm
      tpl2.htm

      ...
        • 29525
        • 388 Posts
        Jarnokk

        Thank you again. From what I can see. I have exactly what you have spelled out. Still no joy.

        Would you be willing to take a look at this site for me. I can pm you the login.

        I’m stuck.
          www.terrybarthdesign.com
          • 13585
          • 7 Posts
          Quote from: Terry at May 25, 2010, 10:38 AM

          Jarnokk

          Thank you again. From what I can see. I have exactly what you have spelled out. Still no joy.

          Would you be willing to take a look at this site for me. I can pm you the login.

          I’m stuck.

          I willing to check out and try.. Have you tried it with different browser? (http://tinymce.moxiecode.com/punbb/viewtopic.php?id=20293)
            • 29525
            • 388 Posts
            Thanks for the reference on this.

            I checked this in IE8. No change.

            I sent a PM to you.

            Thank you!
              www.terrybarthdesign.com
              • 29525
              • 388 Posts
              Turns out this was a simple path problem in the template.js file.

              Thank you Jarnokk for the fresh set of eyes!

              Terry
                www.terrybarthdesign.com
                • 25132
                • 129 Posts
                What was that path problem? I am at a dead end as well and just can’t see what I’m doing wrong. Any help appreciated.

                First 11 lines of my template.js file are:

                tinyMCEPopup.requireLangPack();
                
                var TemplateDialog = {
                	preInit : function() {
                	
                	
                		url = "http://www.[i]mydomainname[/i].com/assets/plugins/tinymce/jscripts/tiny_mce/plugins/template/js/template_list.js"; 
                
                		if (url != null)
                			document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></sc'+'ript>');
                	},
                
                



                My template_list.js is:

                var tinyMCETemplateList = [
                	// Name, URL, Description
                	["Competitor List", "http://www.[i]mydomain[/i].com/assets/plugins/tinymce/jscripts/tiny_mce/plugins/template/templates/competitor-list.html", "Competitor List Table"]
                ];



                In my TinyMCE plugin comfiguation in MODx Tools/Configuration, I only have the custom parameter:

                forced_root_block : false

                And I have the template buttons installed. But I still don’t see my template in the drop-down list. If I put both the template.js and template_list.js URLs into my browser address bar, they bring me directly to them so the URLs are correct. Any help appreciated!


                P.S. I am using MODx 1.0.5 and TinyMCe 3.3.9.2

                  • 26931
                  • 2,314 Posts
                  Hi rivendell48,

                  i tried it this way once, and it worked: http://www.modxcms.de/forum/comments.php?DiscussionID=4477&page=1#Item_2
                  http://translate.google.com/translate?js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&sl=de&tl=en&u=http%3A%2F%2Fwww.modxcms.de%2Fforum%2Fcomments.php%3FDiscussionID%3D4477%26page%3D1%23Item_2
                    • 25132
                    • 129 Posts
                    Thanks for your quick reply, sharkbait. Will give that a try - and fortunately I speak German ;-) !
                      • 26931
                      • 2,314 Posts
                      hehe, bestens smiley viel Erfolg