parent
219ff31b8a
commit
17d12e4337
34
Customize-InDefero.md
Normal file
34
Customize-InDefero.md
Normal file
@ -0,0 +1,34 @@
|
||||
# Description
|
||||
How to change the look of InDefero
|
||||
|
||||
**InDefero** is using the [Pluf Framework][pluf] and as such is very simple to customize.
|
||||
|
||||
Let say, you want to change the base template to load a different style sheet. You can see in `IDF/templates/idf/base.html` line 26, that the `style.css` file is used. So, we are going to change it with another style.
|
||||
|
||||
Create a folder, let say `/home/www/indefero/customtemplates/idf` and copy the file `base.html` into it.
|
||||
|
||||
Change line 26 of the new `base.html` with:
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{media '/custom/style.css'}" />
|
||||
|
||||
Copy the file `www/media/idf/css/style.css` as `www/media/custom/style.css` and change the content as you need.
|
||||
|
||||
## Load the new base.html
|
||||
|
||||
To load the new `base.html` file, edit your `IDF/conf/idf.php` file and change the lines:
|
||||
|
||||
$cfg['template_folders'] = array(
|
||||
dirname(__FILE__).'/../templates',
|
||||
);
|
||||
|
||||
With:
|
||||
|
||||
$cfg['template_folders'] = array(
|
||||
'/home/www/indefero/customtemplates',
|
||||
dirname(__FILE__).'/../templates',
|
||||
);
|
||||
|
||||
Now, when looking for a template, InDefero will look first in the `customtemplates` folder. That your custom templates will be loaded and not the original one. Using this approach you can change all the templates the way you want.
|
||||
|
||||
[pluf]: http://www.pluf.org "High performance PHP framework"
|
||||
|
Loading…
Reference in New Issue
Block a user