RuubikCMS v1.1.2 Beta:


RuubikCMS demo

Username: admin
Password: ruubik

Demo website


RuubikCMS 1.1.2 Beta released


RuubikCMS 1.1.2 Beta is now available for download. Special characters in page names are working now...

Read more

RuubikCMS 1.1.1 released


RuubikCMS 1.1.1 is now available for download. It has one small new feature and includes the manual security...

Read more

Local file inclusion vulnerability


We were informed 2011-10-17 that RuubikCMS 1.1.0 has a local file inclusion vulnerability in file...

Read more

Bookmark and Share

Complete list of template PHP codes

Initialize CMS, Template

<?php require('ruubikcms/page.php');?> Initialize CMS in the beginning of the template (index.php)
<?php echo $siteroot;?> Site root directory, defined in CMS Settings
<link rel="stylesheet" type="text/css" href="<?php echo $siteroot;?>ruubikcms/website/css/style.css" /> Example of linking a CSS-file to the template

Site Settings

<?php echo $page['sitename'];?> Site/company name
<?php echo $page['doctype'];?>
Site document type (DOCTYPE)
<?php echo $page['lang'];?> Site content language
<?php echo $page['charset'];?>
Character set used to save the site
<?php echo $page['description'];?>
Sivun description (meta name="description")
<?php echo $page['keywords'];?>
Site keywords (meta name="keywords")
<?php echo $page['robots'];?>
Indexing instruction for search engines (meta name="robots")
<?php echo $page['author'];?>
Author of the site (meta name="author")
<?php echo $page['copyright'];?>
Copyright holder (meta name="copyright")
<?php echo $page['gacode'];?> Google Analytics tracking code for the entire site


<?php echo $page['name'];?> Page name
<?php echo $page['pageurl'];?>
Page URL (the last part)
<?php echo $_GET['p'];?> Same as page URL (the last part)
<?php echo $page['title'];?> Page title (TITLE-element)
<?php echo $page['header1'];?> Page H1-header
<?php echo $page['subheader'];?> Name of the main level page (can be used e.g. above the submenu)
<?php echo $page['content'];?> Page content
<?php echo $page['extracode'];?> Page extra code (e.g. HTML iframe). Use this if there is no PHP in extra codes.
<?php eval("?>".$page['extracode']);?> Page extra code when PHP is used (contact form etc.). For security reasons do not use when PHP is not used.
<?php echo $page['image1'];?> URL of page decoration image 1
<?php echo $page['image2'];?> URL of page decoration image 2
<img src="<?php echo $page['image1'];?>" alt="pic" /> HTML for inserting decoration image 1
<img src="<?php echo $page['image2'];?>" alt="pic" /> HTML for inserting decoration image 2


<?php snippet('snippetname');?> Snippet, replace 'snippetname' with a correct name.
<?php snippet_php('snippetname');?> Snippet with PHP code, replace 'snippetname' with a correct name.
<?php if ($page['pageurl'] == 'frontpage') snippet('sample');?> Snippet 'sample' only for page named 'frontpage' (Page URL).
<?php if ($page['pageurl'] == 'frontpage' OR $page['pageurl'] == 'company') snippet('sample');?> Snippet 'sample' only for pages named 'frontpage' or 'company'.
<?php if ($page['pageurl'] != 'company') snippet('sample');?> Do not show snippet 'sample' on page named 'company'.


<?php echo $page['news'];?> Site news listing


<?php echo $page['dropdownmenu'];?> Site menu structure as nested unordered lists (UL) for drop down menus
<?php echo $page['mainmenu'];?> Site main menu (separate UL)
<?php echo $page['submenu1'];?> Site submenu 1 (separate UL)
<?php echo $page['submenu2'];?> Site submenu 2 (separate UL)
<?php echo $page['submenuslide'];?> Submenu 1 and submenu 2 as nested unordered lists (UL) e.g. for a slidemenu

HTML code (ul, div, class names) for menus and other parts can be edited in file 'ruubikcms/page.php'.

Back to documentation index