Using Page Themes

From FundaWiki

Jump to: navigation, search

If you want to use the theme option when you create a new page, then go to your database and choose the webthemes table. Insert a new row (in phpmyadmin use 'Insert'). Set ID to the lowest number that's not used yet (first 1, then 2 etc) and set THEME to the text that should be displayed in the theme dropdown menu.

Now open your index.php file.

For example insert the following code in the HTML head section:

   if ($parser->theme == 0){
       echo '<link rel="stylesheet" type="text/css" href="bluestyle.css" />';
   }
   if ($parser->theme == 1){
       echo '<link rel="stylesheet" type="text/css" href="greenstyle.css" />';			
   }

The pages using the standard theme will now use the stylesheet bluestyle.css and the pages using your new theme will use greenstyle.css.

Now update a page with the new theme or create a new page with the theme to test that it's working.

Personal tools