1. | From Dreamweaver's Files panel, expand the Templates folder. Double-click hr_newsletter.dwt to open it for editing.The task in this lesson is to add an events column to the Human Resources published newsletter template. All the events will be included in a table; as the number of events varies from month to month, the repeating region is a perfect tool to create a design-time configurable layout. The events table will be placed beneath the primary navigation bar. |
2. | Select any of the main buttons in the main navigation bar on the left side of the page. In the Tag Selector, select the <table> tag and press the right arrow key once. Press Enter (Return) twice to position the cursor below the navigation bar.The events area will initially include a header, two content cells, and a footerall one column wide. The Repeating Table object allows the designer to specify where the repeating region starts and where it stops. In this case, only the second content cell will have a repeating region applied. |
3. | From the Insert bar's Common category, choose Templates: Repeating Table. In the Insert Repeating Table dialog box, set the following fields as shown: Rows | 4 | Cell padding | 3 | Columns | 1 | Cell spacing | 0 | Width | 152 pixels | Border | 0 | Repeating rows of the tableStarting row | 3 | Repeating rows of the tableEnding row | 3 | Region name | Events | After you enter all the desired values, click OK. The table that is created matches the width of the navigation bar (152 pixels) but is otherwise distinguished by the special template regions automatically created. The third row includes an automatically named editable region within the <td> cell. The table row tag is wrapped by a repeating region. In Design view, you'll see the template region border and tab designating the repeating region. If you look at the code, you'll see this syntax: <!-- TemplateBeginRepeat name="Events" --> <tr> <td> <!-- TemplateBeginEditable name="EditRegion1" --> <!-- TemplateEndEditable --> </td> </tr> <!-- TemplateEndRepeat -->
As with almost all automatically generate108 objects, a little customization is necessary to blend the editable region within the Repeating Table element into the page. |
4. | Select and delete the content (a nonbreaking space) inside the newly created editable region; replace it with the placeholder phrase New Event. From the Tag Selector, choose the mmtemplate:editable tag. In the Editable Region Property inspector, change the Name field to eventListing.TipSome template regions can be tricky to select. If you find that selecting the mmtemplate:editable tag in the Tag Selector does not display the appropriate Property inspector, try clicking the tab above the region.[View full size image] Although it might appear pretty obvious when you're done what content should go in the editable region, any additional clue you can provide is always helpful to Contribute users. |
5. | Save your page before continuing. |