ReJump


Chapter 2:: Manual:: ReJump DataFile
Technology



 


Home

Datafile
About
News
Manual
<...
Chapter 2
...>
Download
Contacts








Using templates (base level)

A. Call from browser's address box

Assume you want your site - www.site.com include "photo" section.
Also you want to put index of photographies at the address "http://www.site.com/photo".
All what you want to see you should describe in the file (template), which name is "photo" and put it to the folder "templates". "photo" is usual html-file, but without extension.

B. How template holds another one

You can put all necessary information into one template (for example it would be "photo"). But if your page consists of similar elements it would be better to build the result page of parts (other templates) like of building blocks. At the same time you could avoid the code doubling.
To put one template into another you should set the following code into the proper place <@template's name@>, for example <@photo2@>

C. Addressing to templates in subfolders

You can store all templates in one folder (its name is "templates"). It would be more convenient if you distribute them among subfolders (especially in case you have a lot of files).
To indicate template "photo2" location in the definite folder (for example templates/subdir) you should call it in the following way "subdir-photo2".
When you create a designator on template on its way symbol "/" replaced by "-".
You can't use symbol "-" in template's name or in folder's name.

Using technology of template insertion you could avoid the code doubling and raise site flexibility.
For example you can write your copyrights in the single template and put it on all your pages. To change copyright on all pages it is enough to change the information in one template.

Using that technology looks like using SSI.

Index
Download
Contacts
If you have any questions, please, contact us via email: datafile@rejump.com.


© 2002-2009 Алексей Мась, ReJump