I use garland as a base theme for mine.
I didn't actually applied these to changes to garland theme, but to my own, in order to get more flexibility to layout.
But I think the patch I provide here shouldn't change any behavior of garland theme, "out of the box"; anyway it might be of some use for other "end-users" of garland, so here are my notes:

---

Garland's function 'phptemplate_body_class($left, $right)' looks like a reminiscence of D5.
In D6, to provide body element class attribute to page.tpl.php, 'template_preprocess_page()' initialises $vars['body_classes'] instead.

Two differences:

  1. phptemplate_body_class() returns the full attribute string,
    while $body_classes holds the attribute value.
    -> page.tpl.php small change
  2. the classes names have changed
    '' -> 'no-sidebars',
    'sidebars' -> 'two-sidebars',
    'sidebar-left' -> 'one-sidebar sidebar-left',
    'sidebar-right' -> 'one-sidebar sidebar-right',

    So we need to change our css selector 'sidebars',
    in style.css and print.css

          sed -i 's/\.sidebars/.two-sidebars/g' style.css
          sed -i 's/\.sidebars/.two-sidebars/g' print.css
    

Two new layout classes are then available: 'no-sidebars', 'one-sidebar', and many others, e.g. 'node-type-*' .

Oh ... reviewing the patch I saw a small typo in print.css line 22:
'sideber-left' ...
I don't know the consequences yet, so I left it in place.

HTH

CommentFileSizeAuthor
garland-body-classes.patch3.49 KBRockyRoad

Comments

mdupont’s picture

Version: 6.12 » 6.x-dev
Issue summary: View changes
Status: Active » Closed (won't fix)

I'm closing this issue for the following reasons:
- No activity in more than 4 years, so the community doesn't have much interest in the issue
- Feature requests should be done against the latest development version of Drupal (and now it's Drupal 9)
- Drupal 6 is near End-of-life and will not see new features
- Garland theme is deprecated in Drupal 7+
- This patch introduces light cosmetic changes to the Garland theme but can break subthemes relying on these CSS selectors, so we don't want to break backward compatibility for almost no reward.