User Guide and Documentation

5. Variables and FunctionsRelease Date: 2019/05/01

Here are some of the functions and variables you need to develop a theme.

Name Type Description
$_theme Class (Object)   Enables to use the theme.php class in your theme file. Example Usage
$_theme_name String Gives the folder name of the theme.
$_theme_display_name String Gives the name of the theme in the setting file.
$meta Array It comes as an array. Example Returned Value
$header_title String The header name of the found page.
$header_description String The header description, if available.
$breadcrumb Array It comes as an array. Example Returned Value
$tpath String For example: Returns a return reply  as templates/website/Themename/
$tadress String Returns a return reply as https://site.com/templates/website/Themename/
$badress String https://site.com/ gives the address where the system is installed.
$sadress String Gives the following address: https://site.com/resources/.
$master_content_none Boolean If used in the theme file, master content is disabled and the theme file is called directly.


$ _theme sample usage

   /*Sample Function Call Code*/
echo $_theme->example_function();
/*Sample Variable Usage */
echo $_theme->language["lang-key"];


Sample $meta Information

[
'title' => 'Meta Title',
'keywords' => 'Meta Keywords',
'description' => 'Meta Description'
]


$breadcrumb Sample Information

[
[
'title' => "Home",
'link' => "",
],
[
'title' => "Contact Us",
'link' => "https://www.site.com/contact",
]
]
 

« theme-config.php File Structure 6. Language Usage »

 
Copyright © 2019. All rights reserved.
Top