Q. What does the repeating region in a
template do?
A. It allows us to add and order content within our templates.
Repeating regions- Part One
Author: jojo
Author's Site: Webade
Reference ID: 15611
The repeat region template option.
We can use the repeating region to control the layout of sections
of our page that need to be repeated. There are two types of repeating
region within Dreamweaver MX that function as part of your template,
these options are:
The repeating region and the repeating table.
So what is the difference between the two?
The repeating region does not include an editable region by default but
you can insert an editable region into the repeating region if you wish.
The repeating table option lets you define the table and gives you the
option of creating the editable regions within that table, and it also
allows you to define which rows are taken into the repeating region.
That's the basic idea of the repeating regions, we'll look at the repeating
region in this tutorial and cover the repeating table in a separate tutorial
a little later.
The repeat region.
To begin with we can download our basic pre-set template from here.
I will assume you have set up your site in Dreamweaver MX and have
your pre-designed template open and ready in your Dreamweaver MX
work space. Now we can begin.
Lets look at what we have. In the image below we can see our editable
"Content" region, above this we have an empty table row and
above that we have what could be a title for this section of information;
the information we will create with our repeating region.
Lets type some text into the empty cell, anything you like will do. When
you have done that click inside the table cell and select the <td>
tag from the tag selector at the bottom left of Dreamweaver MX as shown
below.
Now we can click the "Templates" tab on the Insert Panel and
select the "Repeating Region" icon as below.
This will produce a dialog box, we can accept the defaults as below
and click ok
Our table cell is now wrapped in the "Repeating Region" as
below, save the template and close it.
Select F11 to open our Assets Panel, right click the template and select
"New From Template" from the list as shown below.
This will create an instance of the repeat region template. You should
immediately notice the controls as shown below, we haven't seen anything
like this in a template before!
We now have a repeating region, but it isn't editable yet so lets move
on and give the "Repeating Region" editable content and then
we can look at our controls and how they work.
Close our template instance without saving it.
Reopen the "repeatregion" template by using the shortcut F11
and double clicking the template in the lower part of the Assets Panel.
Click inside our "Repeating Region" and reselect the <td>
tag from the tag selector at the bottom left of Dreamweaver MX as we did
when we added the "Repeating Region". With the <td> tag
selected go to your "Templates" tab and from the Templates options
select the "Editable Region" icon.
This will insert an "Editable Region" within our "Repeating
Region". This makes the "Repeating Region" editable which
provides us with the ability to edit each section of the "Repeating
Region" as we require. We can now save our template and close the
document leaving the Dreamweaver MX work space empty.
|