• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How do i package a DW extension?

New Here ,
Jul 22, 2009 Jul 22, 2009

Copy link to clipboard

Copied

Hi all

I have created an Insert Object extension (or at least i have tried) for DW CS4, however i have no idea of how to package it and make it appear in the insert bar.

In other words, i have created the HTML, JS and icon files - what is next? How do i make it an installable package, so that a new insertbar is added and the buttons are displayed?

Thanks in advance.

TOPICS
Extensions

Views

3.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 23, 2009 Jul 23, 2009

In your 'head' you have -

<macromedia-extension
         name="Joomla! 1.5 Template Builder"
         version="1.0.0"
         requires-restart="true"
         type="insertbar">

The 'type' is the default location for the item, it then takes the name of the htm(l) file, which in your case is 'if'.

Your mxi file is not showing the append to code (example in the mxi_file_format.pdf last item), my example is -

<menu-insert appendTo="Joomla">
<menuitem id="DWMenu_Insert" name="If" file="if.htm" />

</menu-inse

...

Votes

Translate

Translate
LEGEND ,
Jul 22, 2009 Jul 22, 2009

Copy link to clipboard

Copied

Out of necessity this reply may appear to be a little unclear, it is not intended so.

If you do not have the sdk for developing extension then you can get it here - http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1009962 , do not worry that it says DW8, and you will get warnings that items are placed in other places, the extension must also be installed by selecting 'run as administrator' when starting the extension manager in vista, (a new version of the sdk is in development).

After installing the extension go to the dreamweaver program folder (not the users), and you will find a folder called SDK, inside this folder the docs folder contains a folder with file inside, both called, MXI file format, The code for creating an extension (example of), is contained within this pdf file, (first item).

If you get stuck with any item or code for this, please feel free to ask for clarification.

PZ

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 22, 2009 Jul 22, 2009

Copy link to clipboard

Copied

Thanks alot! That got me some of the way, however i cant quite make it function.

 

This is my .mxi:

 

.mxi
<macromedia-extension
         name="Joomla! 1.5 Template Builder"
         version="1.0.0"
         requires-restart="true"
         type="insertbar">
     <author name="(removed) , inFront Media" />
     <products>
         <product name="Dreamweaver" version="8" primary="true" required="true"/>
     </products>
     <description>
         <![CDATA[This extension is a template tool assisting the implementation of Joomla! 1.5 templates.]]>
     </description>
     <ui-access>
         <![CDATA[Access the tool by selection Insert > Joomla!.]]>
     </ui-access>
     <files>
         <file
             source="if.htm"
             destination="$Dreamweaver/Configuration/Objects/Joomla"
             shared="false" />
         <file
             source="if.js"
             destination="$Dreamweaver/Configuration/Objects/Joomla"
             shared="false" />
     </files>
     <configuration-changes>
         <menu-insert appendTo="DWMenu_Insert">
             <menu id="DWMenu_Insert_Joomla" name="Joomla">
                 <menuitem name="If" file="if.htm" id="DWMenu_Insert_Joomla_If" />
                 <separator />
             </menu>
         </menu-insert>
         <insertbar-changes>
             <insertbar-insert pretendTo="DW_Insertbar">
                 <category folder="Joomla!" id="DW_Insertbar_Joomla">
                     <button file="if.htm" id="DW_Insertbar_Joomla_If" image="if.gif" />
                 </category>
             </insertbar-insert>
         </insertbar-changes>
     </configuration-changes>
</macromedia-extension>

 

All i want is a submenu in the Insert menu containing the parent "Joomla" and the sub "If" referring to the functionality of if.htm, and accordingly a Joomla bar in the Insert bar with the button "If".

 

What is the problem here?

 

The above code gives a parent menu in the Insert menu "Joomla" but no sub elements. instead the If Menu is displayed under the Parent Joomla as a parent iten (see screenshot). The Insertbar doesnt appear.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 22, 2009 Jul 22, 2009

Copy link to clipboard

Copied

As near as I can see (sorry, I have broken my glasses ), you are using two separate names for the menu name.

  1. <![CDATA[Access the tool by selection Insert > Joomla!.]]>
  2. <menu id="DWMenu_Insert_Joomla" name="Joomla">

One has a ! on the end, the other does not.

PZ

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 22, 2009 Jul 22, 2009

Copy link to clipboard

Copied

Okay, that solved the insert-bar problem, but the menu is still like on the screendump

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 23, 2009 Jul 23, 2009

Copy link to clipboard

Copied

In your 'head' you have -

<macromedia-extension
         name="Joomla! 1.5 Template Builder"
         version="1.0.0"
         requires-restart="true"
         type="insertbar">

The 'type' is the default location for the item, it then takes the name of the htm(l) file, which in your case is 'if'.

Your mxi file is not showing the append to code (example in the mxi_file_format.pdf last item), my example is -

<menu-insert appendTo="Joomla">
<menuitem id="DWMenu_Insert" name="If" file="if.htm" />

</menu-insert>

PZ

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 23, 2009 Jul 23, 2009

Copy link to clipboard

Copied

Great! Now everything seems to function as intended. The last problem i have (sorry) is that in the insert bar the buttons are named after the files (for example head.htm is named head), eventhough i set label and name in the mxi file. What is missing?

<button id="DW_Insertbar_Joomla_Head" name="Insert Head Code" label="Insert Head Code" file="head.htm" image="head.gif" />

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 23, 2009 Jul 23, 2009

Copy link to clipboard

Copied

Check the <title>...Name goes here..</head> in your html, if this is present it will, according to the documentation use this name, (change that to should in my experience, as I have known it not too).

PZ

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 23, 2009 Jul 23, 2009

Copy link to clipboard

Copied

Just as an aside, if you have an older version (pre DW 8), the following extension may prove helpful in future, (you will have to modify the code it generates but it is a good starting point for creating an mxi file), don't try to install on versions after DW 8 as it does not work, and you will only get javascript errors when you try to access the commands menu.

http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=149758

PZ

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 23, 2009 Jul 23, 2009

Copy link to clipboard

Copied

Not sure you got my point right :-).

Only the buttons label is not right. The name of the insert bar, and the names in the menu is fine, only the text by each button is named after the file name.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 23, 2009 Jul 23, 2009

Copy link to clipboard

Copied

LATEST

Sorry (the code was different in your mxi file that you posted, and looked o/k), if you mean the 'pop-up' text then change this line -

<button id="DW_Insertbar_Joomla_Head" name="Insert Head Code" label="Insert Head Code" file="head.htm" image="head.gif" />

to -

<button file="head.htm" id="Insert Head Code"  image="head.gif" />

PZ

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines