When to use Delta, Context, and Rules

Events happening in the community are now at Drupal community events on www.drupal.org.
ret5's picture

Hey everyone... pardon the noob question here but would like to get some feedback regarding when to use or perhaps a proper workflow for using Delta, Context, Rules, etc. when it comes to the Omega theme. I haven't delved into Delta or Context yet (next in my list of things-to-learn).

Here's my situation:

I have a few Omega sites that work well. Very well. However I could use the following:

Depending on which media query is active, I need certain blocks and content to populate different regions/zones as the browser scales.

For example, when in normal or wide layout, I might have a block with some teaser text or an image in a "preface" zone. However when it scales to narrow or the default mobile, I need that same block to populate in "sidebar first" rather than "preface"

Would a delta and context be the way to go about this? Could anyone offer a quick guideline or even a tutorial link on how to get something like that implemented?

Many thanks!
- Bob

Comments

Only the browser knows the width

dhalbert's picture

Media queries are acted upon by the browser. The server will serve up only one layout, and the media queries in the browser will select what CSS to apply. Without some Javascript to move things around on the browser side, or some Ajax feedback to the server to report back the wdith, I don't think things can't be moved from one region to another.

I can imagine that you might serve up the same content twice, once in the preface and once in the sidebar. Then use display: none in the width-specific CSS to hide one or the other, so that for any given width, only one is visible. Unfortunately you cannot directly specify that that the same block shows up in two regions. However, you could use "Insert Block" or "Insert Node" or one of the Reference modules to get the same content to show up in more than one place.

I'm no expert, so perhaps I'm missing some technique, or there may be some other Javascripty module that will move things around.

thx

ret5's picture

thanks @dhalbert for the info. that answers my question. also found Jake's Delta video at https://vimeo.com/18686603 which pretty much explains good use-case scenarios and how-to's for using delta & context (although its for Omega 2.0 but still applicable).

Thanks again!

Omega Framework

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: