Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

Can I please get some input on the differences between the two?

I'm building a website where using 'context' is very important. After watching this video series about Page Manager by NodeOne, I feel that Panels 'context' and its ability to securely pass arguments to Views is very important. However, the Context module has a plugin that does a similar type of function called the View Default Argument From Context module.

share|improve this question
1  
Please accept the answer if it works for you! –  Alex May 15 '11 at 0:40
    
@alex I don't think that the answer satisfies the question. It seems to me after some investigation that Ctools context has some very useful things like loading objects in Page Manager that get passed back to modules that implement a Ctools plugin. This greatly enhances the ability to, for example, get objects to build tokens based on a context. I think for complicated application websites this context might be very useful. see –  Adam S May 15 '11 at 1:18
    
fair enough, maybe a bounty will jumpstart this :) –  Alex May 15 '11 at 1:41
    
After looking at this a little more I think the big difference is Development Seed walking away from Drupal development giving everything they made in Drupal to Phase2 including maintenance of Context, Features and Spaces modules which means that they probably won't be much further developed at this point. While the fundimental idea behind context in Ctools defines the base for all current development of Drupal 8 core. –  Adam S May 15 '11 at 2:07
    
Lullabot slideshare covers blocks vs panels vs context: slideshare.net/davexoxide/drupal-blocks-vs-context-vs-panels –  chrisjlee Aug 31 '11 at 16:43

3 Answers 3

up vote 8 down vote accepted

I prefer Context module in most cases. I find it simpler and less heavy-handed than Panels, which takes over entire pages. A good use case for Panels is when site admins will be rearranging landing pages themselves or for sites with a lot of unique layouts.
I pick between Panels and Context for a given site when evaluating wireframes or designs. In some cases it makes sense to use both.

I can usually handle the Views arguments I need within Views itself (often by setting the default argument) and don't need the Panels side to do it.

share|improve this answer
6  
This article explain the differences well: lullabot.com/articles/assembling-pages-with-drupal –  Jody Apr 30 '11 at 18:39
    
I think the difference is the Context module supports an approach to building Drupal architecture that is API code centric while Panels is database centric. If someone built a question content type like on this page with answers that have comments like this, the answers would have to be Entities too. This requires a lot of pieces being aware of each other. The answers have to know what question, the question has to know the user object of the author, the answers have to be aware of the user objects of their respective authors and the related block has to be aware of the taxonomy. –  Adam S May 1 '11 at 1:57

My opinion

Paired with the delta module there isn't really a need for panels.

The User interface for panels is overly bloated (imho).

I've outlined the pros and con's; a lot of the ideas are taken from the lullabot slideshare . I've added my own ideas in there as well:

Case for using Both Panels and Context

  • Exportable
  • Faster then creating separate layouts
  • More Granularity
  • No more dependencies on Drupal's Core Block System

Panels

Pros

  • Drag and drop interface
  • More powerful than blocks
  • Built in cacheing mechanism
  • (As you said) passing arguments from views
  • Integrates well modifying output from: views, blocks, nodes, menu module
  • Provides an interface to create different layouts easily

Cons

  • Slight Learning Curve
  • Extraneous markup produced by panels output
  • A lot of overhead in creating a layout.

Context

Pros

  • Delta module allows any theme to be modified dependent on any reaction and trigger different layouts
  • Flexibility to join multiple complex contexts (negative url matching)
  • Eventually will integrates with rules

Cons

  • Not ideal for client friendly / low-level ui; requires developer knowledge

Resources:

share|improve this answer

I think the Context ability to change theme layouts 'on-the-fly' certainly overrides any preference for using the Panels custom layouts. I find it exceptionally useful with grid-based themes such as Fusion where you can alter fixed width columns without complicated CSS changes.

share|improve this answer
1  
How do you use fusion with context? I use context with Omega but on this project I'm using fusion. –  Adam S Dec 20 '11 at 13:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.