Dreamweaver Extensions

Working with XML content

To change the content of your gallery you can use FlashDevlopment24 Wizard (Right click on Flash Object, then FlashDevlopment24 Wizard -> Flash Image Gallery -> 'Image list') OR you can edit the content directly in gallery.xml file in Dreamweaver (File -> Open).

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

<?xml version="1.0" encoding="utf-8"?>
<gallery>
   <category caption="CATEGORY 01">
      <item caption="Photo 01" image="gallery_files/photos/01/photo01.jpg">
         <description><![CDATA[DESCRIPTION 1]]></description>
      </item>
      <item caption="Photo 02" image="gallery_files/photos/01/photo02.jpg">
         <description><![CDATA[DESCRIPTION 2]]></description>
      </item>
      <item caption="Photo 03" image="gallery_files/photos/01/photo03.jpg" video="videos/video.flv" />
   </category>
   <category caption="CATEGORY 02">
      <item caption="Photo 01" image="gallery_files/photos/02/photo01.jpg" tip="TIP 1" />
      <item caption="Photo 02" image="gallery_files/photos/02/photo02.jpg" tip="TIP 2" />
   </category>
</gallery>

In this example, parent <gallery> tag contains 2 child tags <category>. Each item inside category represents as an image. All these items are differ only in additional attributes.

For example, first and second image in the first category have following attributes: caption - caption="Photo 01", link to image - image="gallery_files/photos/01/photo01.jpg" and "Description 1" - <description><![CDATA[DESCRIPTION 1]]></description>. Third item represents as video file video="videos/video.flv" with caption - caption="Photo 03" and thumbnail - image="gallery_files/photos/01/photo03.jpg".

Images in the second category have additional attributes like tip - tip="TIP 1" but no additional description.

<gallery>

Description
Main tag and contains the description of the image gallery.

<category>

Description
Contains images of this category. Descriptions of the images represented as tags <item>.

Attributes

  • caption, The caption of the category.

<item>

Description
Contains the path to the image file and description of this image. Here is used Server scripts to create thumbnails. BUT you can create thumbs using your own images, just add thumb attribute and set link to this file, which will be used as a thumbnail. If the server scripts are turned off and you didn't specify thumb attribute, so thumbnails will be created from the main (original) images.

Attributes

  • caption, The caption of the image.
  • image, The absolute or relative URL of the image file. A relative path must be relative to the HTML file. Absolute URLs must include the protocol reference, such as http://.
  • thumb, The absolute or relative URL of the thumbnail file. A relative path must be relative to the HTML file. Absolute URLs must include the protocol reference, such as http://.
  • video, The absolute or relative URL of the video file. A relative path must be relative to the SWF file. Absolute URLs must include the protocol reference, such as http://.
  • tip, The tip of the image. It is shown when mouse over thumbnails.

<description>

Description
It is an optional tag, which contains the description of the slide. You can use HTML tags in the description. HTML text should be placed inside CDATA section. A CDATA section starts with the following sequence: <![CDATA[ and ends with the first occurrence of the sequence: ]]> All characters enclosed between these two sequences are interpreted as characters, not markup or entity references. For example:

<description><![CDATA[
   <p><font color='#707070' size='18'>DESCRIPTION</font></p>
<p>Lorem ipsum dolor sit amet, <a href='empty.html' target='_blank'>consectetuer adipiscing</a> elit, sed diam nonummy.</p> <p><a href='empty.html' target='_blank'>Read more</a></p> ]]></description>
Note: Use only SINGLE quotes inside tag <description>.