As you already know from the "How SmartJobBoard Software works" section of the Manual, the front-end layout is based on the Templates system. Software Templates are built using Html and Smarty code.
More information about the way Templates system work and its role in the system you can find in “How SmartJobBoard software works” section of this Manual.
In the System Templates section of the Admin Panel you can edit all the existing templates of the software except Email Templates that are located in a separate section.
To get to this page you need to go to Admin Panel > Layout and Content > System Templates. On the opened page you will see the ‘Active Theme’ specified:
It means that “OfficeView” Theme is the current theme of the front-end. And therefore all changes you make to any of the templates will be applied to the templates of the “OfficeView” theme only.
If you need to edit templates of another Theme you need to go to Layout and Content > Themes section and make the needed Theme current.
Highlight Templates on Front-end
Also on the System Templates page you can see the “Highlight Templates on Front-end” function:
To enable this function you need to select ‘enable’ from the drop-down list and press the “Save” button.
This function is made for your convenience and the example on the picture below displays the way it works:
Once you enabled the “Highlight Templates” function you can go to the needed page of the front-end. In the example above you can see the part of the front-end homepage. If the page you need was already opened you just need to ‘Refresh’ it.
You will see the “edit template” icons helping you to easily find and edit the exact template (“Edit template” icons are highlighted with the red circle on the picture above).
You just need to click on the ‘edit template’ icon located on the font-end component you want to edit – and a dialog box containing the needed template will be opened. E.g. clicking on the icon located on the top blue menu you’ll get to editing the top menu template called ‘top.tpl’.
Creating a New Template
If you need to add a new template to the system - use the "Add a New Template" form on the Edit Templates page:
Template Name - enter a desired name for a new template, make sure to not use space characters, instead you can use '_'
Module Name - here you need to select a module/folder where the new template will be located.
Then press the "Add" button. A new template will be created and will appear in the templates table of the module you selected.
Further on the Edit Templates page (below the “Add a New Template” form) you can see the “Modules” table:
Modules contain templates. The “Description” column indicates the kind of templates each module contains.
Clicking on the “Edit” icon opposite a Module you will get to the page with templates you can edit.
E.g. clicking on the ‘Edit’ icon opposite the “Main” module we’ll get to the page containing homepage template and all site pages templates (as it is specified in the ‘Main’ module description):
On the opened page you will see the list of the templates contained in the “Main” module.
As you already know, homepage template called ‘main.tpl’. Other site pages templates is called ‘index.tpl’.
To edit any of the templates – click on the ‘Edit’ icon opposite the templates you want to make changes for.
Edit Templates (Main.tpl)
For example we need to edit main.tpl (homepage template).
On the opened page you will see this path specified on the top:
Then as you see on the picture there is line informing you what Theme is currently active (on our picture it is “OfficeView" theme); therefore all changes will be applied to the “OfficeView” theme homepage only.
If you want to change the homepage of another Theme, you need to make this particular Theme “Current” first (for that you need to go to Templates > Themes section of the Admin Panel and make the wanted Theme current) and then start editing the homepage template.
Then you can see “Module”, “Function” and “Parameters” options:
Each module contains one or more functions that can be used.
From the drop-down lists you can select ‘Module’, needed ‘Function’ and ‘Parameters’ to be inserted to the template. Once a Module is selected, in “Function” drop-down list you will see the functions relative to this particular Module appeared.
To add it to the template you need to press the “Insert” button. You will see the appropriate line added to the template code in the wide text-field below.
New code line will be inserted to a place in the code where you set your mouse pointer.
In the wide text area on Edit Homepage Template page you see the html and Smarty code of the site homepage template. Editing this code you can change the homepage look and feel the way you need.
Once you made the needed changes to the code, make sure to press the "Save" button at the bottom of the page.
To see the changes you made you can open the site homepage in a browser. If front-end homepage was already opened before editing – you just need to refresh it using “Refresh” button of your browser or clicking on the F5 key on your keyboard.
Above we reviewed homepage template (main.tpl) editing – and likewise you can edit any of the templates to customize the software according to your needs.
Clearing Smarty Cache
Caching is used to speed up a call to display() or fetch() site tempates by saving its output to a file.
If a cached version of the call is available, that is displayed instead of regenerating the output.
If you have edited templates and changes have not applied on the front end, or have applied but are displayed incorrectly clean smarty cache: