Anyhow, a few questions:
1. I understand that a template can have many themes (or is it the other way around?)
2. I checked the default template/theme of ZM, and I want to suggest some small changes regarding the name of the objects/methods and such
I think the code used in the template/theme file should be easy to read/understand and remember.
- Code: Select all
<?php if ($zm_theme->themeFileExists("theme.css")) { ?>
<link rel="stylesheet" type="text/css" media="screen,projection" href="<?php $zm_theme->themeURL("theme.css") ?>" />
<?php } ?>
better:
- Code: Select all
$zm_theme->getCss("theme.css", "screen,projection");
// or just $zm_theme->getCss(); which will load all files. I will send you my newest cj loader class
This doesnt make any sense to me
- Code: Select all
<?php if (null != ($bannerBox = ZMBanners::instance()->getBannerForSet('footer1'))) { ?>
<div id="bannerFour"><?php $macro->showBanner($bannerBox); ?></div>
<?php } ?>
better:
- Code: Select all
<?php if (ZMBanners::exists('footer1')) { ?>
<div id="bannerFour"><?php ZMBanners::show('footer1'); ?></div>
<?php } ?>
This is php and ?
- Code: Select all
<?php if (!ZMTemplateManager::instance()->isRightColEnabled()) { ?>
body div#content {margin-right:20px;}
<?php } ?>
The code is neither pure html or css thus very hard to read and understand
The mix use of class/static class and sometimes static class instance() also confused me a whole lot, perhaps we can have a better way to do this? What do you think Mano
