Copy link to clipboard
Copied
I'm building an extension - for the first time - to just insert some of my own Template Language API code into an HTML document. The idea being that the user selects "Insert > Template Language > Template Language Item" to pop in the piece of code they need.
Everything looks right to me, the mxi packages in to an mxp just fine, and I'm able to place my "Template Language" menu correctly under the "Insert" item in the toolbar. The issue I'm running into is this: You select the code snippet to insert and nothing happens. No error, no output, nothing.
I've set up the mxi file according to Adobe's provided documentation and examples, and I've set up the core html files according to what comes included with Dreamweaver (I used hr.htm as the example). I've been working on this for over a week and whittling down mistakes, but now I'm at a loss.
I'd really appreciate some help - I'll attach the mxi file, and I can attach the code files if anyone cares to give me a hand.
Thanks in advance.
Copy link to clipboard
Copied
Hi
Unfortunately due to my current workload I am not able to offer any personal help with the extension.
It is unlikely that the problem is with your mxi/mxp files but more probable with your html or js files.
The first thing to check is that they have the correct doctype for the extension and that your js is working correctly, and that any links are referring to the correct js or html files, as these are often the cause of problems.
(This documentation is for cs4, and you probably already have your own copy - http://help.adobe.com/en_US/Dreamweaver/10.0_Extending/WS5b3ccc516d4fbf351e63e3d117f53d5f9f-7ffe.htm... ).
PZ
Copy link to clipboard
Copied
While I do initially agree that the issue may be in the html files used to insert content, I have found that they do work if I manually place them into the configuration/Objects folder then manually edit the insertbar.xml file, the commands appear in the insert bar and the code is inserted into the document when I click each button.
Unfortunately, a manual installation of this code is out of the question, as this extension will serve several users.
When I built the HTML files, I used Adobe's HR.htm as a template. Is there a certain way I should build the HTML that differs from that file? I'm completely stumped on this. I've tried to follow the examples Adobe has set to the letter.
Copy link to clipboard
Copied
Hi
Try changing- $Dreamweaver/configuration/TemplateLanguage
to - $Dreamweaver/configuration/Objects/TemplateLanguage
in your mxi file then repackage.
PZ
Copy link to clipboard
Copied
Thanks, PZ, that put me on the right track. It turns out I had to do some more wrangling in the Javascript to get it to run correctly. One last thing: as it stands, all of my code snippet commands are in the "commands" menu, when they should be in the "insert" menu. If I set my mxi file up as I have in the one attached to my first post, the code will not insert. It looks to me like it's set up correctly, but obviously something is off.
Attached is my current mxi file, which treats all of the code snippets as commands instead of inserts. Is there a different way to go about setting up the mxi file? Setting the "type" as "insertbar" up at the top doesn't seem to change anything.
Copy link to clipboard
Copied
Hi
You have not included the insert bar changes section a fuller example of mxi files than the one in the extending dw docs is available at - http://help.adobe.com/en_US/ExtensionManager/2.0/mxi_file_format.pdf
check pages 45-46.
PZ