OneThird CMS

Lightweight CMS for Small website, Web application framework.

Download Document


About template tag

The basic specifications of the tag

In OneThird CMS, template files, has its own tag that can be used in the edit tags that can be used both in the text that can be edited in the time of post editing and pop-up dialog can be used

The format of the tag are as follows

And tag the start mark, describes the tag name and the parameters between the end mark

Tag list that can be used

The use of the tag has been commentary sprinkled with examples

It should be noted that, in the example of the tag so we omit the {}, please note

※ There is a tag that can be used in addition to the tag that says here, please wait for a while because we have established a document

Parameter relationship

In OneThird CMS, in addition to the $_ SERVER or, such as $_ SESSION special global variable of php

$ Config, $ params, you can use

$config is, is within the normal OneThird a fixed variable, which is set primarily in the config.php not done rewriting

$params is working variables that are changed are evaluated in OneThird such as site information and page information

The main variable

Tag name $params['data_url'] 
functionExpand the template URL 
Tag name $config['site_url'] 
functionDeployment to the site of the URL
Tag name $params['circle']['files_path']
functionExpand the path of the template
Example var/
Tag name $params['login_user']
functionThe logged in user ID
(log off at 0)
Tag name $params['circle']['acc_right']
functionThe privileges of the user is logged in
Tag name $params["circle"]['url']
functionThe URL of the site
Tag name $params["request"]
function$_server [ 'Request_uri'] and about the same

※ *** _ in the case of the path in the case of *** _ url the last / it does not stick to the end / Gatsuku


$the params [ 'page'] is housed information about the page

Tag name Content Remarks 
page number 
Page title
params['page']['type'] Page type
 (= 1 ordinary page, reference plugin.php for details)
params['page']['link']  Page link 
params['page']['mode']  Image mode
(= 0 draft, = 1 Normal page)
params['page']['mod_date'] Page last updated  
params['page']['date'] Page creation date  
params['page']['user'] Page created user  
params['page']['tag'] tag 
 params['page']['meta']  Page metadata 
params['page']['block_type'] Page of the block type
(= 1 usually, = 5 inner pages) 

ut tag

ut tag is what was to be read the utility function for the plug-in from the template

Tag name Exterior> expand
function$continuous and returns an array of KEY in html
ParametersArgument 1: array of KEY
argument 2: Delayed flag (default, false)
※ when delayed flag is true, after the end of the tag deployment of all of the buffer, it is deployed
Example  Example

$html['test'][] = "1";

$html['test'][] = "2";

$html['test'][] = "3";

$ut->expand('test') -> "123';

Tag name ut->expand_sorted
functionSame as expand, but expand it sort an array key
Parametersut-> same as expand
Example  Example

$html['test'][2] = "a";

$html['test'][3] = "b";

$html['test'][1] = "c";

$ut->expand('test') -> "cab';

Exterior> icon

To expand the system icon

$ut->icon('edit') edit

$ut-> icon ( 'admin') admin


$ut->icon('save') save

$ut->icon('delete') delete

$ut->icon('remove') remove

$ut->icon('setting') setting


$ut->icon('add') add

$ut->icon('ok') ok

$ut-> icon ( 'ng') ng




Exterior> str

Output by combining the arguments

In the argument, if there is a bool type, evaluated as a conditional statement, not do anything when the true, when false, end deployment


$str((bool)$params['login_user'],"<a href="javascript:void(ot.show_login_panel())">login</a>")

Exterior> link

To synthesize the URL than the internal page number or alias

First parameter: number or alias name,

The second and subsequent parameters


xxx deployment to query parameters


$ Exterior> link (1);







To expand the page number in a tag

First parameter: number or alias name,

The second parameter following: number or alias name,

Third and subsequent parameters


xxx deployment to query parameters

file tag

To expand the file name

Files can be uploaded, it is selected by the system toolbar


name: xxx <= identifier

group: yyy <= location for storing the files (installation folder / files / img / yyy /)

caption: xxx <= menu name of the system toolbar

inbfo: descriptive text to be added to the xxx <= uploader



plugin tag

Read the plug-in files, to run the plug-in

call tag

Call of any function

※ You can not call a dangerous function


Installation folder /files/1/plugin/plugin.php

function test($arg)


return print_r($arg,true);




load tag

Reading of any of the php file and less file

less files are compiled into css in compiled mode, it will be loaded as css

First parameter: php or less

The second parameter: php file or less full path of the file



dump tag

Tag for debugging

Display converts the variable content into the table



※ If you just write out the contents of the variable, it can be substituted in the var_dump and call tag


flexedit system


Each tag, will be expanded internally to flexedit tag


$div('name:xxx', .... )

Parameter settings of flexedit

parameterfunction Remarks 
It can not be omitted

Write = in the meta information of self own page

= Use the meta information of the top top page

= Number or page alias

= Not performed tag deployment against false setting string 

= True ... a non-logged at the time does not display

= Display false ... at the time of non-login


= Unspecified html

= Text text



 Insert a string in front of the HTML 
inner_html2 To insert the string after the HTML 
Tag of the element  
wrap_tag  To wrap the element tag in wrap_tag
list = The true element tag in the form of a list  
class The class name of the element tag  
safe-echo Display to escape the HTML 
height The height of the edit pop-up  
sysmenu Without displaying the edit handle is displayed on the system menu  
no-edit Do not show the edit handle  


To insert the HTML statement to the HEAD tag, the end position of the BODY tag


To add to the end of the header part


To add to the end of the BODY part


Google Website Translator - Google Translate