Currently the modules folders structure is:
- assets (for images/css/js).
- code ( for main module php core).
- hooks ( sentora daemon related code).
The common way of building html to concatenate html in the module currently.
Issue:
Changing the design is complicated.
Solution:
Adding a new folder:
- views
Where we store store views partials and load them using MUSTACHE:
https://github.com/bobthecow/mustache.php
The rendering would be like:
We could also move later to handlebars, mustache views could easily used by JS too later as there is a mustache parser in JS:
http://mustache.github.io/
https://github.com/janl/mustache.js
I plan already to add Mustche in /etc/lib as I will use it for Apache Admin module and vhosts building.
M B
- assets (for images/css/js).
- code ( for main module php core).
- hooks ( sentora daemon related code).
The common way of building html to concatenate html in the module currently.
Issue:
Changing the design is complicated.
Solution:
Adding a new folder:
- views
Where we store store views partials and load them using MUSTACHE:
https://github.com/bobthecow/mustache.php
The rendering would be like:
Code:
$m = new Mustache_Engine;
echo $m->render(mytemplate, array('vars' => 'values!'));
We could also move later to handlebars, mustache views could easily used by JS too later as there is a mustache parser in JS:
http://mustache.github.io/
https://github.com/janl/mustache.js
I plan already to add Mustche in /etc/lib as I will use it for Apache Admin module and vhosts building.
M B
No support using PM (Auto adding to IGNORE list!), use the forum.
How to ask
10$ free to start your VPS
How to ask
10$ free to start your VPS