Theme directory as variable
Posted: Mon Dec 28, 2009 5:35 am
Most template files have references to the "default" theme folder for images, however if I want to create a new template I have to modify many of these references to point to the new theme directory. Also, if I change the name of the directory for any reason, I have to go through these references all over again.
How about setting up a variable available to every template file which contains the current theme name or the current theme directory...
So,
This would save time and make building OC templates much easier.
What do you guys think?
How about setting up a variable available to every template file which contains the current theme name or the current theme directory...
So,
Could be:<img src="catalog/view/theme/default/image/...">
Or even easier, a variable containing the path to the theme's image folder:<img src="catalog/view/<?php echo $theme;?>/default/image/...">
WordPress does something like this with the bloginfo() function to retrieve a ton of info which makes theme development much easier for designers and developers.<img src="<?php echo $theme_image;?>/...">
This would save time and make building OC templates much easier.
What do you guys think?