OneThird of global variables that are used in CMS, $ params, $ database, $ config, $ ut, $ html, $plugin_ar is very important
$config is the basic parameters that are set in config.php, and set the various values site URL, etc.
$database accesses the database objects (class)
$ut the template, php either use utility object (class)
$params is a working variables required for the operation, while the $config is set in config.php, such as page data such as dynamically world m crowded value will be set
$plugin_ar is you can set the operation of the plug-in, you can use when you can add user-defined plug-ins
A particularly important variable among them is the $ html
HTML data that is finally output are stored in $ html
OneThird In CMS
Various drawing function (renderer) is, to set the data to $ html,
In accordance with $html template (default.tpl, etc.), a function that expand_html, to be displayed is poured the data into the template
Has become a mechanism that
In CMS such as WrodPress, while program is HTML output in a sequential echo command, in the final stage of the program in OneThird CMS, we are assembling the HTML output
The contents of $html but can be freely modified, following sequence is it will be set in the system, it must be deployed in the template file (it is necessary to write the command to deploy the template file)
$html ['head'] is, so as to expand in the head of the template
The page title in the $html ['head'], description, canonical, etc. system is metadata is set to prepare
$html ['css'] is, so as to expand in the head in the header
Standard plug-in, a number of template module, to the relentless proprietary CSS, there may be a plug-in is not expanded for use does not work
$html ['article'] is, so as to expand the page text
Since the standard drawing functions, it is page_renderer are using the output destination, standard page can not be displayed If you do not expand this
$html ['meta'] is, so as to deploy just before the end of the body tag
Because the plug-in use the output of the script system, it does not work most of the plug-ins you do not expand this
$html variable, but will eventually be deployed in expansion function expand_html, and embed actually of $html content is $ut->expand is a function
The purpose of the position in the template file, $ut->with expand ('array key'), the contents of the $html will be developed in the buffer
$html ['array'] is, is possible both deployed in a string or an array
So, for example, $html ['meta'] If you want to add the contents
$html ['meta'] [] = "you want to add content";
You can add in
Things that you want to add, there are for example those bad Once written in the script, such as double
In that case, $html ['meta'] ['foo_func'] you can to prevent the double write and add the key to the array name as of
In addition, in the plug-in, even if you have what you are using an array key and $html ['css'] ['plug-in name']
This is because you want to like can modify its elements as you like before deployment
On a template file, $ ut-> expand, which will be deployed in the order in which they Kakare to template
Some things, there is a thing bad when you expand soon
For example, $html ['css']
CSS, which is set from each plug-in, because it is written in the header portion, when called from the plug-in tag it is written in the text might not already reflect the data in the pre-deployment
For at that time, in the second parameter to expand command, has become a way can be one of the flag setting does not want to delay reading
If the flag is set, after the end of all the expansion is wound after the deployment of the array, it will be expanded one last time