PAGE Methods
Including templates and objects
content(), module(), object()Request content via AJAX
collect(), complete(), elements(), element()Insert code (CSS, JS, HTML)
style(), script(), meta(), bottom(), tracking()Template data
directory(), views(), details(), preview(), charset(), language(), error()Reading and writing META data
title(), topic(), descr(), claim(), robots(), keywords()HTTP header
mime(), status(), expires(), header(), download()
directory()
Get current template directory. There is another function which will provide the data table's directory().
string directory([ string name [, int format = 2 [, int root = 0 ]]])
Return
Formatted directory.
Parameter
Description
nameName of file and/or directory (see examples below)
format1 = relative path: dir/...
2 = absolute path: /dir/...
3 = root path: SERVERROOT/dir/...
2 = absolute path: /dir/...
3 = root path: SERVERROOT/dir/...
root0 = General template directory
1 = Current template theme directory
2 = Current template theme directory + subdirectory
3 = Current sub + css/
4 = Current sub + js/
5 = Current sub + img/
6 = Current sub + incl/
1 = Current template theme directory
2 = Current template theme directory + subdirectory
3 = Current sub + css/
4 = Current sub + js/
5 = Current sub + img/
6 = Current sub + incl/
Get absolute path to current template's directory
$PAGE->directory()
RETURN: '/templates/default/developer/'
Get root directory of template's theme
$PAGE->directory('', 3, 1)
RETURN: '/var/.../.../templates/default/'
Get file form CSS folder
$PAGE->directory('test.css', 2, 3)
RETURN: '/templates/default/developer/css/test.css'