Multitheme support. How?
Posted: Thu May 05, 2011 2:28 pm
Hey,
I want to add a multitheme support to my CMS website, but I don't know how can I do it in a professional way.
My system differs PHP and HTML codes completely. For example:
test.php file
It's a bit more complicated but that's not important.
test.tpl file
MSG1 and MSG2 is being replaced by PHP.
Additionally, users can change their THEME path via configuration file.
config.php
THEME folder contains every theme. (Note that CSS's are not standart! It looks like a completely different website.)
My question is;
How can I add multitheme support in the most professional way?
For example, if I add theme_2, theme_3 and so on, I will have to define MSG3 if I ever add it on ALL theme files.
I am going to have 30+ theme support so it will be really complicated in the future.
How multitheme support can be handled professionally? I never used Wordpress and so on. How do they handle it?
Will be glad if you help,
Thanks.
I want to add a multitheme support to my CMS website, but I don't know how can I do it in a professional way.
My system differs PHP and HTML codes completely. For example:
test.php file
Code: Select all
LoadTemplate('test.tpl', array('MSG1' => 'Merhaba, 'MSG2' => 'Blahblah));
test.tpl file
Code: Select all
<h2><&MSG1></h2>
<h3><&MSG2></h3>
Additionally, users can change their THEME path via configuration file.
config.php
Code: Select all
$config['THEME_PATH'] = 'theme/theme_1/';
My question is;
How can I add multitheme support in the most professional way?
For example, if I add theme_2, theme_3 and so on, I will have to define MSG3 if I ever add it on ALL theme files.
I am going to have 30+ theme support so it will be really complicated in the future.
How multitheme support can be handled professionally? I never used Wordpress and so on. How do they handle it?
Will be glad if you help,
Thanks.