Posted by mint5auce on September 30, 2011 at 3:07pm
How would I add a sub region to the content region?
i.e. Content section > Content zone > Content region > HERE.
I seem to only be able to add regions either side vertically (next to sidebar first or second), but I want to add one horizontally, that doesn't overlap the sidebars and begins at the same height.
Bad ascii art sketch illustrating what I mean:
Sidebar | New region | Sidebar
| Content |
Comments
Are you sure you need a new
Are you sure you need a new region? What are you trying to do that would require a new region?
I assume so
It's content that's not supplied by $content, so it needs to be addressed differently.
What I'm having the most problem with is seeing how to add anything above content, that's also horizontally aligned to the two sidebars.
Based on diagram...
Based on the diagram in your original post:
Sidebar | New region | Sidebar | Content |There is no reason that this can't be done with the default regions supplied...
If anything needs to be considered here, it would be the way in which regions/blocks/etc. are styled with CSS....
The content (main page content) in Drupal 7 is now a block, and can be placed anywhere you like (still 99% of the time in the content region) This allows for flexibility in how your content is placed on the site visually.
Depending on the content you "need" in the "new region", wether it's a static block of HTML, or a complex view that takes in arguments form the page it appears on, or ANY element that any drupal module (core or contrib) provides, why can't it simply be placed (as a block which everything on the page should be) above the "main page content" block in the interface (either block manager or context)????????
There is no reason that two blocks can't live in the content region, your custom block (or multiple blocks) followed then by the main page content block. The only thing to consider is the visual style you may need to accomplish.... and depending, you may have to use CSS creatively to rather than wrapping the entire content REGION with a style (background with border for example), you might instead need to wrap ONLY the content BLOCK to achieve the style you want, and wrap the other custom block/views/etc with another style...
I think this can easily be accomplished simply by placing the blocks appropriately, and understanding how to apply CSS properties to accomplish the overall look & feel you are striving for.
Jake Strawn (@himerus)
ThemeGeeks | Development Geeks
Omega - 960.gs
We use context
Currently we don’t use the core blocks system to place blocks, instead we use context which provides more power and flexibility. In our D7 sites however, the only exception is the “Main page content” block which we place in the Content region using the core blocks interface. This is primarily to mimic the way D6 worked (ie just printing the $content variable in the template), however it also ensures that the main content is always output, regardless of whether there is an active context on a given page (not all pages would have a context assigned to them after all)
So… the issue with trying to add extra blocks via context to the Content region, is that you cannot easily order them with respect to the Main page content. We really need a region above the Content region that is guaranteed to always output content above Main page content, but at the same time will not cause the left and right sidebar to be pushed downwards. The only solution to this seems to be having the ability to group/stack regions vertically within a ‘zone’ column.
Any thoughts / pointers appreciated...
But doesn't the page title
But doesn't the page title still sit above any block content added using blocks here Jake? I've been struggling with a similar layout issue on my first Omega/Delta/Context site too.
I.E. If you place and stack first any new content into the content region (using blocks or Context) the content isn't actually placed top of the content region, it's actually placed under the page title. I've resorted to using the Exclude Node Title module to remove titles for this reason. This might seem a strange request (I am a front-end designer and coder and fairly new to Drupal) but I haven't yet found a better way to do this. The problem is effectively the same as mint5auce's as I want content (an image in my case) to sit horizontally aligned with the two sidebar regions but ABOVE* the page title.
I imagine this would be a fairly common (if not completely normal) layout request. Let me know if you want me to supply more specific feedback or visuals.
Meantime Jake: Well done on the Omega/Delta/Context initiative guys. It's great. Keep going!
*Edited. I accidently wrote BELOW in the first reply! :)