Something you should learn to use mix2ool
Of course, the first thing you need in do in order to use mix2ool is download Mix2ool. After extracting the zip file, you will get the following skeleton.
The outermost folder mix2ool is the container of controllers. "model" and "view" are the folders for putting your models and views respectively. You can put your js files(.js) into js folder. They will be combined into one single file if you use the source link client.js. The same for css files but this time the source link should be style.css.
"lang" folder is used to contain your language files. You may take en.lang as an example. "img" folder is used to contain all the images.
The .htaccess file rewrite url of css and js files to the two processors style.php and js.php respectively. You should modify the content of it in order to suit your needs.
RewriteRule style.css /mix2ool/style.php RewriteRule client.js /mix2ool/js.php
If now your folder is renamed to projectA, then these two lines should be
RewriteRule style.css /projectA/style.php RewriteRule client.js /projectA/js.php
These two files are used for creating variables or do any server side logics which will be used in js/css files.
The convention is like this. index.php serves as the dispatcher which will dynamically include the action controllers. index.default.php is the action controller with the action "default". The action is defined either by GET or POST or otherwise "default" in common.php.
The naming of the view is suggested to be filename.actionname.phtml which is the same as the action controller except for the file extension.
<? header("Content-Type: text/html;charset=UTF-8"); ?> <!DOCTYPE html> <html lang="en"> <head> <title>Mix2ool</title> <meta charset="utf-8" /> <?=mixOutputHelper::includeJS("client.js")?> <?=mixOutputHelper::includeCSS("style.css")?> </head> <body id="index"> <?include_once($viewPath . "header.phtml");?> <div class="contentBody viewport"> </div> <?include_once($viewPath . "footer.phtml");?> </body> </html>
You may see the basic HTML5 template here. In order to use html5 and mix extended tags in your view, you should always include client.js and style.css.
You should have a brief idea for Mix2ool. Now you may go to documentation page to see how to use the libraries in Mix2ool.