Ivan
|
I work a lot with Drupal over the last two years and found this software as brilliant. The only one problem is thempating implementation. I took me about 4 hours to add required staff and remove not required or one interfering with Drupal.
Let me give you small advise: Download Drupal 6 and have a look at garland theme or acquia theme. Actually copy the whole template into Artisteer and this will be a good start already. You don't really need to re-invent the wheel to get your software going.
For example, page.tpl.php file
$styles include all drupal styles and template styles. You do not need to include this file separately. This file should be specified in the .info file as this:
stylesheets[all][] = style.css
stylesheets[print][] = print.css
In your implementation this file (style.css) being loading twice.
By having this function in template.php file:
/**
* Sets the body-tag class attribute.
*
* Adds 'sidebar-left', 'sidebar-right' or 'sidebars' classes as needed.
*/
function phptemplate_body_class($left, $right) {
if ($left != '' && $right != '') {
$class = 'sidebars';
}
else {
if ($left != '') {
$class = 'sidebar-left';
}
if ($right != '') {
$class = 'sidebar-right';
}
}
if (isset($class)) {
print ' class="'. $class .'"';
}
}
and having body in your page.tpl.php file like this:
<body<?php print phptemplate_body_class($left, $right); ?>>
you can manipulate width of the main content area in case of one or two sidebars active. The point is if artisteer exports two sidebar layout and Drupal disable one of them because there's no single block active - the main content width is inaccurate.
----------------------------------------
I also found myself prefixing path_to_theme() function with base_path() (to become $base_path.path_to_theme()) as all template images failed to load. (because of no / in front of the source path).
<?php if (isset($tabs)): print $tabs.'<div class="cleared"></div>'; endif; ?> should be followed by
<?php if ($tabs2): print '<ul class="tabs secondary">'. $tabs2 .'</ul>'; endif; ?>
as secondary tabs have a lot of functionality which isn't available currently.
and finally - <?php print $closure; ?> should be positioned right before the </body> tag.
Also looking into node.tpl.php and the rest of box, block etc. files show that you are trying to build another theming layer on top of existing one.
For example,
<?php if ($links) { echo theme('links', $node->links, $attributes = array('class' => 'links'));} ?>
is an equivalent of the Drupal garland equivalent of
<?php if ($links): ?>
<div class="links"><?php print $links; ?></div>
<?php endif; ?>
$links is already available for your template - you don't need to reimplement links again.
I also have found few other re-implementations of existing theme variables.
So please change them accordingly to avoid your customers doing this job again and again.
Thank you for great software, though.
|