Dreamweaver Extensions

Working with XML content

Open the menu.xml file in Dreamweaver (File -> Open), to change the content of your menu. Also, you can open the XML content file through FlashDevelopment24 Wizard (Right click on Flash Object, then FlashDevlopment24 Wizard -> Advanced Vertical Menu). After that, in the category of 'General', click the 'Edit' button near the 'Source' field.

The following example shows the basic structure of the content XML file:

<?xml version="1.0" encoding="utf-8"?>
<navigation>
   <menu title="ROOT-MENU 01">
      <item caption="Caption 1" link="empty.html" target="_self" />
      <item caption="Caption 2" link="empty.html" target="_self">
         <menu title="SUB-MENU 01">
            <item type="img" src="photos/photo01.png" width="75" height="50" link="empty.html" target="_self" />
            <item type="text" caption="Short text" />
            <item type="link" caption="Link caption 1" link="empty.html" target="_self" />
            <item type="link" caption="Link caption 2" link="empty.html" target="_self" />
            <item type="separator"/>
            <item type="link" caption="Link caption 3" link="empty.html" target="_self" />
         </menu>
      </item>
      <item caption="Caption 3" link="empty.html" target="_self" />
</menu> <menu title="ROOT-MENU 02" color="0x2CAAFA" margin_top="10"> <item caption="Caption 1" link="empty.html" target="_blank" /> <item caption="Caption 2" link="empty.html" target="_blank" /> <item type="link" caption="Link caption 1" margin_top="5" link="empty.html" target="_blank" /> <item type="link" caption="Link caption 2" link="empty.html" target="_blank" /> </menu> </navigation>

The structure of menu consists of two root-menu sections.

First root-menu section consists of 3 root items. Where second root menu has its own sub-menu section. Sub-menu section has six items: the first is a picture (it has source for picture, width and height), the second is a simple text and it hasn’t any links, the third and the forth are hyperlinks, the fifths is a separator and the sixth is a hyperlink.

Second root-menu section consists of four items (root-menu has its own individual color and margin). The first and the second are root items. The third and the forth are hyperlinks (third item has additional attribute like margin).

<navigation>

Description
Main tag and contains the structure of the navigation menu.

<menu>

Description
Divide navigation menu into separate parts (for example: ROOT-MENU 01, ROOT-MENU 02) and creates sub menu (for example SUB-MENU 01).

The following attributes are optional for tag <menu>.
Optional attributes

  • title, The title of the menu.
  • color, Set individual color for active menu elements, like Rectangles, Arrows and Background color of the Hyperlinks.
  • margin_top, The top margin of the menu, in pixels.
  • margin_bottom, The bottom margin of the menu, in pixels.

<item>

Description
Contains the menu item.

Attributes

  • caption, The caption of the menu item.
  • type, The type of the menu item. Can have additional values:
    • img, Image. Tag <item> should have additional attributes: src, width and height.
    • text, Simple text. Tag <item> should have only one attribute: caption.
    • link, If you use this tag, <item> represents as a hyperlink.
    • separator, Separator line. If you use this tag, <item> shouldn't have any attribute.

    For example:

  • margin_top, The top margin of the menu item, in pixels.
  • margin_bottom, The bottom margin of the menu item, in pixels.
  • link, The URL from which you can obtain the document.
  • target, Specifies the window or HTML frame into which the document should be loaded. You can enter the name of a specific window or select from the following reserved target names:
    • _self, specifies the current frame in the current window.
    • _blank, specifies a new window.
    • _parent, specifies the parent of the current frame.
    • _top, specifies the top-level frame in the current window.

Note: If you create menu with a complex structure, use attributes margin_top and margin_bottom to justify elements of the menu.