I'd like to print a block outside of the 960 grid so that I can set the {width:100%;} and have it span the entire screen rather than the entire grid.
I'm sure there's an easy solution, but i can't seem to find it.
Can anyone help? Thanks

Comments

ANDiTKO’s picture

Just add a Div and dont add any 960gs classes.

Copy the ".tpl.php" file you want to edit from:
sites\all\themes\omega\omega\templates
or
sites\all\themes\omega\alpha\templates

in your themplates folder and edit it.

tormu’s picture

I'd like to do this too, and without any ugly CSS hacks. There's a support page showing how to add a region outside the grid (http://omega.developmentgeeks.com/documentation/regions/adding-new-regions) BUT this doesn't seem to work in 3.0.
There's a workaround so I can actually get the new region printed (http://drupal.org/node/1200272) BUT the new region gets the default region settings from Omega so it has for example class "grid-1". So that means I'd have to override the CSS and things get ugly.

So how to make a region that doesn't have any Omega settings?

ANDiTKO’s picture

tormu’s picture

But isn't that just another CSS hack?
To add a wrapper and in CSS try to make the content of that wrapper look like _not_ grid-x though it gets the grid-x class?
The problem is that there should be a way to make a region that doesn't have the grid classes at all. Otherwise it's just making an grid-element look like a non-grid-element.

[..which is a bit like making h1 appear like normal text just because you can't get the h1 tag to change into p ;)]

ANDiTKO’s picture

Why don't you use the ".tpl" files and overwrite the php and html output of your theme then. The Apha and Omega are your "base" themes. You can overwrite the code in your child themes. That is why sub-themeing exists. There is no problem at all. Overwriting is not hacking. Just copy the tpl file in your subtheme folder and you are good to go. You can insert any html or whater you want.

tormu’s picture

As per the original issue, the point of the region is to make an area that you can use to build the site through the GUI. I have no problems with theming the tpl files, but I have modules that make blocks and those blocks should be placed on a region and outside the grid layout.

That's why I create a custom region so I can just drag & drop blocks from the block admin GUI to that region. And then there's the problem, because all regions get grid classes in omega.

Of course there's always a way to edit the tpl and hack myself all the way up to the modules to see their output that they would shove to the block itself and put that code right into the tpl... but there's always possibilities to fork Drupal core files and do all kinds of wrong stuff, so let's not go there ;)

ANDiTKO’s picture

Try this:

Open your theme .info file and define your new region
regions[myregion] = My new region

Then edit the page.tpl or whatever tpl want to place it in and render it like this:

<?php if ($page['myregion']): ?>
      <div id="myregion">
        <?php print render($page['myregion']); ?>
      </div>
<?php endif; ?>
tormu’s picture

Defining new region in .info introduces the region to block control, but it also introduces it to omega, which then adds it's default grid settings and so on - even though they are not assigned to any zones.

And this makes it come out through render() with "grid-1" class, which is the default for omega region settings.

And this happens even if I don't actually submit the omega's settings page at all, so all the settings come straight from the .info file and that most certainly doesn't have grid column settings for the new region ;)