This isn't so much an issue but more a discussion. I've just started using Omega and while I'm still getting my head around how it all works, so far it's looking good and very flexible. I do have a concern than perhaps the code that is being generate is a little div-heavy. For example, on the Omega homepage (http://omega.developmentgeeks.com/), the block showing the main menu consists of the following:


<div id="zone-menu-wrapper" class="zone-wrapper zone-static-wrapper zone-menu-wrapper clearfix">  
  <div id="zone-menu" class="container-12 zone zone-menu zone-static clearfix">
    <div id="region-menu" class="grid-12 region region-menu">
      <div class="region-inner region-menu-inner">
        <div id="block-block-41" class="block block-block omega-menu block-41 block-block-41 odd block-without-title">
          <div class="block-inner clearfix">
            <div class="content clearfix">
              <div class="container-12">
                <div class="grid-12">
                  <ul class="main-menu">
                    <li><a href="http://omega.developmentgeeks.com/">Omega Overview</a></li>
                    <li class="omega-docs"><a href="http://drupal.org/node/819164">Omega Handbook</a></li>
                  </ul>

While I realise to make the theme more flexible, it's going to need some number of containers, it's just that when I see this, it makes me twitch a little bit!

Any thoughts?

Comments

nevets’s picture

Those divs as you pointed out increase the flexibility and I find useful. They also have the side effect of making the html self documenting.

rory_o’s picture

You can cut down on the amount of divs that omega puts out by half through unchecking using the full width wrapper on each zone and region, which is on by default.

Most of the rest of them are normal Drupal output. Often Drupal has for each special section type (node, region, block, etc) a corresponding tpl.php file that looks like

<div class=section-type <?php print $classes; ?>">
 <?php print $content; ?>
</div>

So you can cut down on the amount of divs by creating new tpl.php files that just print $content. If you have anything that relies on adding classes into the different section types then this will of course break, so it's up to you to experiment if trying to cut down on the divs will break your site.

marcoka’s picture

Status: Active » Needs review
dasjo’s picture

yep, coming here as i'm looking for a way to programmatically disable wrapper-divs for zones, sections and regions

marcoka’s picture

templates could so some of i

dasjo’s picture

yes my solution so far is creating template overrides for all those

fubhy’s picture

Status: Needs review » Active

Templates overrides is probably the best solution for now. We can think about adding a slim version of all these templates by default so users can select which one they want via the UI.

dasjo’s picture

#7 sounds like a plan

chrisjlee’s picture

Isn't there already a way to remove div wrappers?

TelFiRE’s picture

+1 * >9000 for #7. That would be quite nice