Templates Workflow

In this page we will detail how the template system loads the files.

This map shows the basic functionality:

Warning: Do not directly edit files from _default_ folder into FTP

 

Location where the templates are on disk

The location where the templates can be found on FTP is:

public_html/templates/__default__/

This folder contains the HTML default files.

For the CSS, JS and image files of the default theme the location is:

public_html/public/__default__/

When the admin will edit the default template, it will be taken from _default_ location.

 

How Template System is working

When the file extension is accessed (this applies only to following file type: JS, CSS, Images), a HTTP request is sent to web server.

The web server will check if the file exists into theme’s folder and if the file exists load it from public_html/public/[theme_name]/

Where [theme_name] is the name of the theme set as default.

If the file does not exist into[theme_name] then the system will load the file from _default_ folder

 

What happens when admin edits a template file

When admin will edit a template file, the system will check if the file was previously modified.

If the file was previously modified, the system will load the file from public_html/templates/[theme_name]/, where [theme_name] is the name of the theme that admin is editing.

If the file was never modified, the system will load the file from public_html/templates/_default_/ folder. After the admin will save the file, the system will create a new file and save it into public_html/templates/[theme_name]/

When the admin will click on Restore link, the system will delete the file created into public_html/templates/[theme_name]/ and from now on will load the file from public_html/templates/_default_/.

 

Saving process

After modifying the file,  the system will save the template into the following location: 

public_html/templates/[theme_name]/page.html

Where [theme_name] is the name of the theme admin is editing.

 

 

Restoring process

After you modified a public_html/templates/[theme_name]/ file, but you want to go back to the default existing version, you can restore it by clicking the Revert to default button.

The default file will be restored: public_html/templates/__default__/