Create the Nested Repeat Region

You cannot create the three level nested repeat region in one go. Neither the wizard or server behavior allow this. Instead, you must combine the action of the two: the wizard can generate the first two levels automatically, and the third can be added afterwards through the server behavior.

To start creating the listing of continents, countries and cities, follow the next steps;

  1. Open the site index in Dreamweaver.

  2. Apply the Create Nested Repeat Region Wizard from the MX Kollection tab of the Insert panel.

  3. Configure the wizard's first step as follows:

  4. When all settings are set right, you can click the Next > button to advance through the wizard.


     

  5. In the second step of the wizard, you must decide on the region display type for the lower levels:

  6. After you've finished configuring this step as well, click the Finish button to close the wizard and add all elements into the page.

  7. At this point, the first two levels are correctly retrieved and displayed from the database:


     

  8. Now all that remains is to add the third level: the cities for each country. To do so, you must first create a recordset that retrieves all cities:

  9. Now you must create the placeholder for the region's third level. Right-click in the table's last row, and select Table > Insert Rows or Columns. Add one row below the current selection.

  10. Drag and drop the name_cit field from the recordset rsCities displayed in the Bindings tab of the Application Panel in the newly created row. This is done as it is the label for the third level entries.

  11. At this point, the Dreamweaver page should look like:


     

  12. Select the <tr> tag on the last row, and apply the Nested Repeat Region server behavior: the Server Behaviors tab >+>MX Kollection>Dynamic Lists > Advanced.

  13. In the user interface that opens, you must configure the master and detail recordset to use :

  14. Once applied, a new nested repeat region translator is displayed, surrounding the table's last row. This means that the operation was a success.

  15. The only thing left to do is save your work and upload the entire site to the server. Then preview the site index, and see how the cities are now displayed as yet another table row, just like in the image below (the cities are displayed in bold):

 

To further improve the nested repeat region, you could display the cities with some more indentation , in order to better differentiate from the other elements, or display them inline, by applying the Nested Repeat Region on the <td> tag instead of the <tr>.