Dreamweaver - CS3

Lesson 50: Templates (5)

50/58 Lessons 

Repeating Region (1)

When you re-enter the same information in a page, it may be interesting to use this use repeating regions.
For example, when creating a catalog of all your products, you need to enter repetitive data like a photo, price and a description for each product.

For each of these products we have to enter several rows or a table, does not matter, we must in any case repeat many operations.

For this, Dreamweaver has a solution.

The “Repeating Region”.

To add a “Repeating Region” to our template, we should of course open it first.

For this example I created a second template “product.dwt”.

This template is already used for each of my products and now I am also going to use this for a catalog of my various products.

With the template open, we place the cursor over the existing editable region.

I open a previously created page “catalog.html”, select the table with my products, copy and paste it into the template.

I do this only because, as you know, I do not like work and certainly not like to type.

Ok, this places the table above the editable region “content”.

From this table, I do not need anything, just the first two rows with the product name, price, photo and description.

So I select all underlying rows and click the Delete key on my keyboard.

Then I have this:
A table with two rows and two columns.

Select the table, click the “Insert” button in the menu bar, choose “Template Objects” and click the “Repeating Region”.

In the dialog window “New Repeating Region”, you give it a name such as “product table”.
Click the OK button.
This places a mark above the table that emphasizes that this is a repeating region.

Then we have four editable fields added to the repeat region.

One for the picture, one for the title, one for the price and one for the description.

I’ll start with the photo.

Select the picture and click “Insert” in the menu bar, choose “Template Objects” and click “Editable Region”.

In the dialog box, give the editable region an appropriate name and click the OK button.

This places a mark above the editable area. If you have not noticed, which I doubt, this flag displays the name we have just entered.

Repeat this for each of the cells which we wish to make an editable field.

For this, select the text in the cell, click the delete button on your keyboard, we remove the text that was not needed, click “Insert” in the menu bar, choose “Template Objects”, click “Editable Region” and give the area an appropriate name.

I chose “product title”, “product price” and “product description”.

Save the template and we continue in the next lesson.

Awesome!
You've completed Lesson 50
START NEXT LESSON