library oc_twig
Implementation of Twig template system for OpenCart 2.x
burdapraha/oc_twig
Implementation of Twig template system for OpenCart 2.x
- Tuesday, May 9, 2017
- by landsman
- Repository
- 1 Watchers
- 2 Stars
- 7 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 2 Open issues
- 2 Versions
- 0 % Grown
Twig template system for Opencart 2.x
Because default template system sux.
Inspired by existing but deprecated solution: vanderson139/opencart-twig - thanks buddy!, (*1)
Installation
- composer require burdapraha/oc_twig master-dev
composer require burdapraha/oc_twig dev-master
- Add this code to your composer.json project file:
"scripts": {
"post-install-cmd": [
"php -r \"copy('vendor/burdapraha/oc_twig/vqmod/xml/twig.xml', 'upload/vqmod/xml/twig.xml');\""
],
"post-update-cmd": [
"php -r \"copy('vendor/burdapraha/oc_twig/vqmod/xml/twig.xml', 'upload/vqmod/xml/twig.xml');\""
]
}
It will move vqmod xml file to correct folder. If you are using another folder than "upload" for your document root, change these commands., (*2)
- add constant
define('TWIG_CACHE', true); to your config.php, /admin/config.php
- optionally you can add row to your
.gitignore file with path to tracy.xml (example: upload/vqmod/xml/twig.xml)
- celebrate!