-
Notifications
You must be signed in to change notification settings - Fork 1
Home
The TemplateTools help you to create powerful templates for WebsiteBaker, LEPTON CMS and BlackCat CMS.
- Use the kitFramework CMS Tool to extend your Content Management System with the kitFramework
- In the kitFramework CMS Tool select the TemplateTools and install this extension.
If you start using the TemplateTools you must not rewrite your existing templates, just include the Tools and use one or more of the additional features in any way you want.
Using the TemplateTools is easy, just include them at the top of the index.php
which belong to the template you are working on:
require_once WB_PATH.'/kit2/extension/phpmanufaktur/phpManufaktur/TemplateTools/initialize.php';
Now you have access to around hundred Constants ready to use, for example:
echo CMS_TYPE.' - '.CMS_VERSION;
will prompt something like WebsiteBaker - 2.8.3
or BlackCat - 1.0.2
depending on the Content Management System your are using.
The TemplateTools provide you also with the php
variable $template
to access to the TemplateTools Services, for example to use the Twig Template Engine or a Translator Service:
echo $template['translator']->trans('Welcome back, %name%',
array('%name%' => CMS_USER_DISPLAYNAME));
this will prompt at a English (en
) localized page something like:
Welcome back, Ralf Hertsch
and at a German (de
) localized page something like:
Herzlich willkommen, Ralf Hertsch
Have a look to the different Services provided by the TemplateTools and test the Template Examples.
⇐ Introduction | Services ⇒
- If you spot a typo or want to contribute an article, a how-to or a tip, feel free to edit the Wiki directly
- If you you have any questions, please visit the phpManufaktur Support Forum
This Documentation is part of the kitFramework Project
© 2014 by phpManufaktur, kitFramework and TemplateTools are published under MIT license.