Closed (fixed)
Project:
AdaptiveTheme
Version:
7.x-2.1
Component:
CSS/HTML
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Nov 2011 at 04:04 UTC
Updated:
7 May 2012 at 11:33 UTC
Is there a recommended practice for using Adaptive Theme with the Context module (http://drupal.org/project/context)? It seems like built-in support for Context has come and gone over time. Is there some potential for improved cooperation between Adaptive Theme and Context?
Comments
Comment #1
socialnicheguru commentedI am very interested in this.
I was going to build a sub theme for adaptive theme but I need to get an answer to how adaptive theme and context works together
Comment #2
Jeff Burnz commentedIs there a specific problem you have run into?
Cant see any immediate reasons why there would be problems, just use it.
Comment #3
socialnicheguru commentedAdaptive themes provides a great way to switch to mobile layout.
I wanted to get a sense of how I might use it with context and/or panels to change my theme based on how the end user will view it.
Depending on my user I wan to support different layouts including:
desktop/web - adaptive themes does this
mobile - adaptive themes does this
Facebook pages - I am trying to figure out if I can use adaptive themes to change the layout appropriately
Facebook tabs - I am trying to figure out if I can use adaptive themes to change the layout appropriately
iPhone apps - titanium might be a great way to go.
Comment #4
Jeff Burnz commentedRight, good questions.
Mobile Tools module can give you the context you need - you can use the context it provides (there are two methods of detection), to conditionally display blocks. I would think its not that hard to leverage this context and write a body class also...
Panels + CTools can also use the contexts provided by Mobile Tools module. This is where a theme could step in and provide better layout control over Panel layouts, even provide Panels layout plugins that are responsive. I am working on this right now, see: #1389536: 2012 Roadmap - The Great Leap Forward
My opinion is that a theme has no business in directly making use of context, why? Because themes provide STYLE. Context is business logic and themes are the wrong place to be doing this sort of thing. It is much more powerful to leverage dedicated modules such as Mobile Tools, Panels and CTools (also if you want entirely separate mobile domain use Domain Tools), and simply use the theme to style the result.
Responsive design is different - it does not use any actual business logic. Responsive design is a stylistic adaptation to a screen size, that's all, and using only CSS to do so. When we step into the realm of detecting context we are using logic, this is the job of dedicated modules. If I were to build into this theme such things as context aware layouts then I will immediately LIMIT the capability of the theme, whereas I want to allow end users, like you, free choice to use whatever context modules you require.
I hope that answers your questions.
Comment #5
socialnicheguru commentedI understand and thank you for this.
It helps me to better plan my approach.
So in essence, I can use mobile tools, to help detect which device is being used to view my web page.
I can use panels/ctools and possibly context module to determine what should be seen and which layout.
I can choose any theme I want from that point forward.
Comment #6
Jeff Burnz commentedTheoretically yes, however be aware that I am telling you this from that standpoint, I have not actually had the time to implement this sort of setup in Drupal 7, I have done it many times in Drupal 6.
I will be working on such a setup shortly, when I get heavily into the development of my responsive panels solution. Please report back any findings, I have helped you and it would be nice to have some feedback on your experiences :)
Comment #7
Jeff Burnz commentedMobile tools is great for combining responsive design and contextually controlling the display of content in mobile devices. I think this is fixed now.
Comment #7.0
Jeff Burnz commentedFixed end.