FOR DUMMIES


A template is a form, mold, or pattern used as a guide to making something.

A) PATTERN USED FOR AN HTML FILES

To create a HTML template, after building the page itself, one divides its html code into parts that can be edited, ie that can be modified, and non editable parts.Below we give the necessary code to be entered in lines of code page to create an editable area.

LISTING 1


- we simulate here a listing of a web page, and individuate the parts that you can edit

<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

this is a NOT EDITABLE zone of the code betwrr HEAD and /HEAD TAGS
To create an editable zone, that is a zone you can change, insert a command as below

this is a code's EDITABLE zone, which must have its own unique name
..To close it you should write a command as below


this is another NOT EDITABLE zone of the code between head tags.
Remember that is possible to set a NOT editable zone everywhere - between complete instructions

</head>
<body>

A NOT EDITABLE zone of the code between BODY and /BODY begins here

An EDITABLE zone, which must have its own unique name begins here

A NOT EDITABLE zone of the code between BODY and /BODY begins here

An EDITABLE zone, which must have its own unique name begins here


A NOT EDITABLE zone of the code between BODY and /BODY begins here

</html>


WARNING

 

 

 

B ) DERIVATIVE FILES

From the previous file saved with a dwt (template) you can easily get the derived HTM file by introducing two lines of code. The first one goes immediately after the TAG <html> and the second is added just before the tag

LISTING 2


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<html>

<head>

....................

</head>

<body>

....................

</body>


</html>



At first you shoud type the page and save it as a text file, then insert the commands. This is a quite engaging work, to insert such instructions with a common editor, when the page is a just little bit complex page.
So we should use a special editor. Irecommend to use Adobe Dreamweaver, which has less ties to the programmer.

 

 

C ) HOW DOES THE TEMPLATE WORK

CREATING A HTML DERIVED FROM MODEL TEMPLATE: for this we should take the previous file saved as .dwt and insert a statement immediately after the TAG <HTML>, and another just before the tag </ HTML> as shown in Listing 2 .

It's easies instead to get a template using a specialized editor. Remember that the extension of a template given by different editors can be other than dwt. So I advise you to use always the same specialized editor.

To obtain an html file from the template you should save it with hos own name. Ie, if you have the template named top_horizontal_ menu.dwt you can apply this template to a blank html page using your specialized editor and then save it wherever you need giving it the name and extension htm or html

Here we have prepared htm pages derived from Lino's templates, that you can easily clone and use with another name. In fact, those templates are designed in the way that you're allowed to easily change links to stylesheets, to figures, and to other files.

Of course you must have prepared all the pages and files to link for your purposes, and put into the derivative files all what you need.

EXERCISE

  1. open with your editor this html file (click) derived bya a template

 

 

 

 

D ) MINIMI STRUMENTI NECESSARI - MINIMUM NEEDED TOOLS

Per creare siti sono necessari degli strumenti adatti:

Usare il linguaggio HTML di base è una cosa ottima, perché si scopre ogni giorno una nuova funzione per migliorare la propria abilità, mae per imparare il necessario ci vuole un lavoro pesante. Se siete pigri meglio non iniziare nemmeno.

To create sites you need the right minimum tools:

Using the basic HTML language is a very good thing because one discovers every day a new function to improve his own skill, but a heavy works to learn the necessary is needed. Do not even begin if you're lazy.