-
Notifications
You must be signed in to change notification settings - Fork 10
DevelopTemplates
Preamble: myfoafpressextensions is your folder on the same level with the foafpressapp folder.
$ cd /var/www/yourfoafpressfolder
$ mkdir myfoafpressextensions
Currently it is not possible configure Foafpress to use own CSS/JS files or CSS/JS extensions with existing Foafpress templates. As a workaround you just create your myfoafpressextensions/templates/Foafpress.html.php, importing your CSS and Javascript there. It's not suggested just to edit the Foafpress default CSS files, this would be overwritten with the next Update.
This is only a short example, using the template for foaf:Group resources. You can get help at the mailing list [email protected].
$ cp foafpressapp/core/templates/Foafpress.html.php myfoafpressextensions/templates/Foafpress.html.php
$ cp foafpressapp/core/templates/foaf/Group.html.php myfoafpressextensions/templates/foaf/Group.html.php
Now edit what you need to change, or create it straight new. Foafpress.html.php defines the global layout, header, footer, and so on. foaf/Group.html.php is the template for foaf:Group resources.
$c['template']['folder'][] = dirname(__FILE__).'/myfoafpressextensions/templates/';
That's all. You don't need to copy/create all main/subtemplates to use them. If you don't have the template in your folder, Foafpress uses the default templates.