dmitrig01’s picture

Version: 6.x-1.x-dev » 5.x-1.x-dev

That's 5.x, because panels isn't working for d6 yet

Johnnyk’s picture

Because I'm currently stuck at this very point with my usecase for context I'm interested in this issue.

Is this something that could be solved by using ctools in any way? It seems, that the delegator really does alls that kind of stuff. Maybe it could be used to call contexts? Or the api itself could be used to build up something around node detection.

My main concern right now is using panel node overwrites in conjunction with context.

As I'm not a skilled coder and context itself beeing very complex and theoretical (for me) I've no clue where to start.

But I'm also very interested and I like to read developers opinions and rodemaps. As their main job isn't writing this stuff I still pretty much like it. Maybe someone has got some time and can write anything about this problem.

Thank you very much.

dmitrig01’s picture

Panels context and the context module have nothing in common. The setting in the video is simply to set the context when the panel is being viewed.

Johnnyk’s picture

I know that - except for the name - context and panel context don't share anything.

My point somehow was, that both try to examine a given situation and decide what to do next. Espeacially for node overrides I think one can see, that both modules nearly do the same.

Context Modules looks e.g. for the type of node setting a given context - Panels Module looks for type of node delegating the page to a given panel.

With the new implementation of panels pages as a general handler for incomming page requests i thought there could be a point context could join to make it easier for context module to - for example - deside which node type is going to be viewed.

MY point however is, that I don't want to tell anybody what to do or anything - I just wanted to ask what we can hope for context module and the panels integration.

Summit’s picture

Subscribing, also interested in panels integration assuming panels context and context are completely different things.
greetings, Martijn

frankcarey’s picture

Any status on this? This is critical for us since we are using node overrides. It all worked fine with Menu Trails module... could it be a module order thing?

frankcarey’s picture

Version: 5.x-1.x-dev » 6.x-2.0-beta4

Moving to 6.2, especially with panels 3 now at RC1.

vegardjo’s picture

+1 subscribe

bennos’s picture

panels is now in major release version 3. should be stable.
would love to see some activity here. can provide testing.

garywiz’s picture

It might be worth looking at the quick issue discussion I just had with merlinofchaos (#587344: Context confusion).

I am really a fan of Context, but it does appear that there are two completely independent "context" directions happening. True integration seems unlikely, but there would be great benefits if some thinking could be done to figure out how to get the best of both worlds.

We have had to say "no" to Panels 3 mostly because we are so happy with Context that we can't possibly do without it at this point, and can't adopt "more than one" way of managing it (our content manager's head would explode). Really unfortunate though, because what I want is Panels 3 and the Context module!

Reading the issue over there may be useful background and then maybe some discussion here, or a separate issue?

Pasqualle’s picture

the two context definitions are different, and I do not really see any type of integration of the two concepts.
As I know there is no conflict between the modules, so you can use both on the same site. All you have to know is that the context in panels means something different, no need for head explosion :) If you configure the site nicely, then content managers probably do not have to change anything in context, nor panels..
But, yes I agree, giving the same name to two different things makes some confusion.

garywiz’s picture

It's not so much that it won't work technically, it's more a matter of symmetry. For example, our content managers have learned that our new sites will have three characteristics, "focus", "sitetype", "pagetype" and those are context entries which allow them to decide where modules go and how menus work. So, the Context concept has really permeated our design methodology. If people go to panels and see the word "context", they'll ask, "where are all the focus contexts we set up, etc." and won't know how to make panels do what they want without going back to developers.

We'll be doing a lot more development on this, I'll be thinking about ways to integrate, or at least share some information between the two.

mErilainen’s picture

Interested to see how this goes forward.

I see that Context has more options and can be used in different situations than Panels contexts.

For example:
I'm using Panels context at the moment to show a block next to a wikipage to show recent changes to that page. These wikipages are inside a group, so I could use Context to make my "Groups" menu item active, maybe show the group menu on right sidebar etc. which I think Panels context cannot do (correct me if I'm wrong).

In general, Context helps me in bigger scale to let user know which section is active, while Panels context gives me nice tools to use different layouts for different content types.

SocialNicheGuru’s picture

Does anyone know if this works with panels 3?


frankcarey’s picture

Yes I'm using it with panels 3 now, and they seem to play nice together.

SocialNicheGuru’s picture

I did an override of user/$user and it didn't seem to work with spaces.

Do you have it working with pages or mini-panels?

Thanks for any insight you might have.


frankcarey’s picture

update: user page overrides (user panels) doesn't fire hook_user "View", so you'll probably have issues getting the "user" conditions to work. See #599298: Event "User page has been viewed" not triggered when using overrided Panel page, user "view" hook not being called for my workaround.

SocialNicheGuru’s picture

so your code referenced in #17 will allow for spaces recognized panels?

frankcarey’s picture

It should, assuming that it's suffering from the same problem. Try it out and let us know.

SocialNicheGuru’s picture

It does seem to work... thanks!

My override of the user/%user page is now redirected via spaces and context.


gdud’s picture

+1 subscribe

barraponto’s picture

running both panels and context,it seems that if a view is a condition for a context, the condition is triggered even if the view is loaded inside a panel. bug?

garywiz’s picture

@barraponto, if that is true, please open a separate issue for it! I am guessing that it may happen in more circumstances than just panels (using Views Attach, or Quicktabs, for example). The code appears to limit views context to situations where a page or calendar display is being rendered, however I know that Quicktabs can render any element of a view and I'm pretty sure it would happen there as well.

Steven Jones’s picture

Version: 6.x-2.0-beta4 » 6.x-3.0-beta4

Any Panels/Context integration probably needs to happen in 3.x. Or be provided by a bridge module.

yhahn’s picture

Version: 6.x-3.0-beta4 » 6.x-3.x-dev
Assigned: Unassigned » yhahn
Priority: Normal » Critical

Guessing this will actually mean integration with Page Manager.

nedjo’s picture

lpalgarvio’s picture

how about bringing in the features from Context into Chaos Tools or Panels?

not sure that would be possible, but could have some benefits (probably some counters too)

davidburns’s picture

wasn't there supposed to be a subscribe link for individual issues?

subscribe +1

davidburns’s picture

Status: Active » Needs work
96.68 KB

I hate CVS! I don't know how to diff new directories and files. I apologize for submitting a zipped version of the dev branch with my changes. But I needed to get this posted so I can get some feedback. It's still not working, but the initial hooks are in place and the files are where they're expected.

Adds Selection Rule and Context for context module to ctools, and therefore panels.

Additions are in plugins/access and plugins/contexts

And a hook in context.module

* Implementation of hook_ctools_plugin_directory().
function context_ctools_plugin_directory($module, $plugin) {
  if ($module == 'ctools' || $module == 'page_manager') {
    return 'plugins/' . $plugin;
EclipseGc’s picture


edward_or’s picture

I feel the CVS pain!

I have had a quick glance at the access and context ctools plugins you added. Did you have to make any other changes to the code base or is this the main difference?

davidburns’s picture

5.49 KB

Based upon the Spaces_Panels module provided here ->
I decided it would be easiest to maintain in it's own module. So I pulled all the code back out and created Context_Panels.
@EclipseGc gave me a good base to build upon. I've added the access plugin. But there's still a long way to go. As it currently stands, I don't believe it's functional.

New module attached.

edward_or’s picture

I had a chance to have another poke around with this.

I don't think this will work as it seems that ctools create_context is run before any context (context module) is set.

So lets say we have a context called sitewide set by the context UI and we do,

function MOD_context_create_context($empty, $data = NULL, $conf = FALSE) {
   context_isset('context', 'sitewide') )

context_isset is going to return false. This means there is no way to load the context (context module) at this point.

I will have to go through the context module in more detail to see when it creates the contexts set in by UI.

itserich’s picture


sgabe’s picture


mansspams’s picture

Subscribe. Merlin needs to see and comment on this, because his efforts with Panels Everywhere is kind of the same thing. He wanted to brake free from core block module and Contexts did it elegantly. Im sure he can invest some ideas and advice.

itserich’s picture

I don't think there have been many reports in Panels about a conflict.

I opened this thread a couple months ago but no one else has commented, aside from Merlin.

I am also confused because I think Panels has a "context" feature, but my problem is definitely when I enable this Context module. CSS breaks in Panels + Context modules. I think.

bryancasler’s picture


mpotter’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Needs work » Needs review
2.16 KB

Implemented this in D7 recently using the latest versions of the Context and CTools modules. Hadn't seen this thread before, but this patch is similar in concept to the one posted in #29. Maybe some of the issues have been fixed over time because I haven't run into any conflicts or problems with this. It's basically a straight-forward ctools-access plugin to be used in the Selection Rules for a panel.

Should help with people who really need integration between Context and Panels for odd use cases.

NWOM’s picture

Issue summary: View changes

Is the patch on #39 still necessary for context integration on node edit/view overridden panel pages?

I intend on using the Context Form Alteration module, but after looking at the Context issue queue I was unsure if Context would even work in this case.

Thanks in advanced.