Create a spry repeat list region – Adobe Dreamweaver CC 2014 v.13 User Manual
Page 239
child level. For instance, if you have a list, the data is checked at the
at the level. The Repeat Children option may be especially useful if you use conditional expressions in your code.
4. Choose your Spry data set from the menu.
5. If you already have text or elements selected, you can wrap or replace them.
6. Click OK to display a repeat region on your page.
Note: All Spry data objects must be within regions, so make sure you’ve created a Spry region on your page before inserting a repeat
region.
7. When you click OK, Dreamweaver inserts a region placeholder into your page with the text “Content for Spry Region Goes Here.” You can
replace this placeholder text with a Spry data object such as a table or repeat list or with dynamic data from the Bindings panel (Window >
Bindings).
The Bindings panel displays the available data from the data set.
Note: In the Bindings panel, there are some built-in Spry elements, ds_RowID, ds_CurrentRowID, and ds_RowCount, also listed. Spry uses
these to define the row a user clicked in when determining how to update dynamic detail regions.
8. To replace the placeholder text with a Spry data object, click the appropriate Spry data object button in the Insert panel.
9. To replace the placeholder text with one or more dynamic data, use one of the following methods:
Drag one or more elements from the Bindings panel on top of the selected text.
In Code view, type the code for one or more elements directly. Use this format: {dataset-name::element-name}, as in {ds1::category}. or
{dsProducts::desc}. If you are only using one data set in your file, or if you are using data elements from the same data set that you
defined for the region, you can omit the data set name and simply write {category} or {desc}.
Regardless of which method you use to define the contents of your region, the following lines of code are added to your HTML code:
Create a Spry repeat list region
You can add repeat lists to display your data as an ordered list, an unordered (bulleted) list, a definition list, or a drop-down list.
1. Select Insert > Spry > Spry Repeat List.
You can also click the Spry Repeat List button in the Spry category in the Insert panel.
2. Select the container tag you want to use: UL, OL, DL, or SELECT. The other options vary depending on which container you choose. If you
choose SELECT, you must define the following fields:
Display Column: This is what users see when they view the page in their browsers.
Value Column: This is the actual value sent to the background server.
For example, you can create a list of states and show users Alabama and Alaska, but send AL or AK to the server. You can also use the
SELECT as a navigational tool and show product names such as “Adobe Dreamweaver” and “Adobe Acrobat” to users, but send URLs such
as “support/products/dreamweaver.html” and “support/products/acrobat.html” to the server.
3. Choose your Spry data set from the menu.
4. Choose the columns you want to display.
5. Click OK to display a repeat list region on your page. In Code View, you can see that HTML
- ,
- ,
- or FORM select tags are
inserted into your file.
Note: If you try to insert a repeat list region but you haven’t created a region, Dreamweaver prompts you to add one before inserting the table. All
Spry data objects must be contained within regions.
232