Closed (won't fix)
Project:
Context
Version:
6.x-2.0-beta7
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2009 at 23:16 UTC
Updated:
21 Dec 2010 at 14:01 UTC
context is not normally set now for node tabs other than 'View' and 'Edit' ('Revisions', for instance) when i'm looking at a node of the type i selected. from what i can tell, it's because the only nodeapi op is 'load'.
i'm wondering if anyone has ideas about the best way to go about overriding that. right now, i am doing it with a nodeapi hook function in my own module, on 'load' op calls, that checks the node type and then the current path to see if it looks like "node/this-node-nid-value" using arg().
Comments
Comment #1
firelad commentedBrad, would you please explain in more detail what you do to fix this, and how to duplicate it? I'm not a coder, so I can't really figure it out from your brief explanation.
Many thanks,
Marc.
Comment #2
brad.bulger commentedthis probably won't be all that much clearer :) but i'll give it a shot.
i'm using the context as part of a feature module created by the Features module.
i edited the module file created for the feature and added an implementation of hook_nodeapi, like this:
that works well enough for what i'm doing but i'd expect there has to be a better real solution.
Comment #3
steven jones commentedIf you wanted to add this functionality generally the you would need to implement a hook_context_conditions and provide the various node ops, then implement a slight modification of the code above to set any contexts based on those ops.
Comment #4
steven jones commentedNo more features for the 2.x branch I'm afraid.