Software Articles

October 1, 2009

Working With Editable Regions On Dreamweaver Templates

Filed under: Dreamweaver — Tags: , , , — Chris Mason @ 5:46 pm

A Dreamweaver template is a blueprint for a web page which can provide a mechanism for creating and updating multiple pages with a common layout. Any of the web page types that Dreamweaver handles can be made into a template: HTML, ASP, ASPX, CFM OR JSP. Templates consist of fixed regions and editable regions. The fixed regions are those parts of the page which contain elements which will be identical on all pages based on the templates: things such as logos, navigation bars, headers and footers. The editable regions are those areas of the page which can be modified each time a page is created and based on the template.

When creating your template, there is no need to specify which regions of the page will be locked when the template is applied to a page. The entire page will be locked by default and, hence, if you save a template that has no editable regions, a dialog box will appear reminding you that the template is pretty much useless until you insert at least one editable region.

To create an editable region, position the cursor in the required location and choose Insert – Template Objects – Editable Region. A dialog box will appear prompting you to enter a name. Enter any descriptive name and click the OK button.

As to where editable regions should be placed, there are two main scenarios: you can create a free region or a bound one. By a free region, I mean one in which you can enter any content you like; by a bound one, I mean one where the content you enter is limited. For example, if you want to create an editable region into which you can insert the main content of each page, you would probably be placing your editable region inside a DIV element. However, if you want to create an editable region to allow users to insert just a heading, you would place your editable region inside an H1 element.

The element inside which you place your editable region is of paramount importance and it is very easy to accidentally place an editable region inside a paragraph of heading element by mistake. In fact, Dreamweaver will always display an alert if any template that you save has an editable region inside a paragraph or heading element.

There are two simple ways of keeping track of where your editable region is being inserted. The first is to switch to Code view and double-check where your cursor is positioned. The second is, while in Design view, look at the tag selector. This is the area at the bottom of the document window on the left of the status bar. The last tag displayed on the tag selector is the one inside which your cursor is currently positioned. If the last tag displayed is P for paragraph or H1, H2, etc., simple right click on the unwanted tag and choose Remove Tag from the context menu.

Click here for Dreamweaver Training in London or call 0800 1950 502.

Powered by WordPress