Dreamweaver CS3 integrates the Spry function. We all know that Spry has the function of processing XML data. We have also seen it, but the detailed area function of Spry seems to be rare.
The Spry detail area is somewhat similar to the function of the news list page and main detail page in the news system. For example, when we watch the news, one of the pages will only display the titles of all the news. When you are interested in the title, you can click the title to open a new web page and view the entire content of the news. Then the page that displays the list of all titles is called the "home page", and the page that displays specific news content is called the "detail page".
Obviously, this main detail page must be at least two pages. The Spry detailed area we use can be displayed on a web page without refreshing.
1. Create a new web page and bind the Spry XML data set
Open the [Insert] panel in the web page and click [Spry XML Data Set] under the [Spry] tab.
2. Select XML data source
The [Spry XML Data Set] dialog box pops up. [XML Source] can be XML data in the local directory or cross-domain remote XML data.
Click the [Get Schema] button and select valuable repeated elements in the XML data in the [Row Element] list box. Here is the selected "item" element (the + sign in the upper right corner of the <> sign indicates multiple loops).
PS If you create a pure XML data aggregation page, you can also select [Disable XML data caching] and select the time to automatically refresh the data to automatically obtain remote data synchronization.
3. Insert Spry table and display Spry XML data on the page
Click the [Spry Table] button under the [Spry] tab of the [Insert] panel, and delete the [Columns] that do not need to be displayed in the pop-up dialog box.
It is important to select the "Update" detail area that will be used when rows are clicked.
[OK] Insert the Spry table, prompting that the Spry area needs to be inserted. Because all Spry XML data must be displayed in the Spry area.
Fourth, insert the Spry detailed area
First, stay with the mouse cursor after the "Spry table" that has been inserted into the page, and continue to click the [Spry Area] button under the [Spry] tab of the [Insert] panel.
In the pop-up dialog box, the [Type] must be selected as "Detailed Area" to indicate that the current Spry detailed area is used.
5. Insert "Details" into the Spry details area
Place the mouse cursor in the Spry detailed area, open the [Binding] panel, and select the "description" element to [Insert] into the Spry detailed area.
Saving the web page will prompt us to save the Spry effect files. Remember to upload these files together when uploading.
6. Preview effect
Display remote XML data across domains, and click the title of each row to open the content for viewing on the current page without refreshing, which is very good.