I may be misunderstanding something about default contexts, but they seem to be applying the context to more pages than they should. Here's what I've got:
- A context defined by path for a donate section. The path is donate and donate/* for the pages. The attribute (or tag as it's called in later versions) is 'donate', and the name is default, so the context definition is context->donate->default
- I have 'default context' checked on here
- It's my understanding that anything I put here should serve as the default for the donate and donate/* pages and not any other pages on the site outside of that context definition
- My homepage is at /home and has it's own context as well (defined by path )
- When I set the donate context as "default context" the blocks appear on the donate pages but also on the home and other pages across the site. So, I'm getting blocks from BOTH the current context AND the default donate context
Maybe I'm not understanding default context properly, so I'm happy to change this to a support request if it's deemed as such. Any input on what's happening here?
Comments
Comment #1
Rob_Feature commentedHmm...thinking further about this and changing it to a support request. I realize that something about my thinking is wrong here, just not sure what it is yet...
Comment #2
Shademan commentedi'm pretty sure "default context" means its active on every page (you can just add exceptions)
Comment #3
adrianmak commentedhttp://treehouseagency.com/blog/neil-hastings/2010/10/14/context-everywhere
Comment #4
Rob_Feature commentedHmm...the context anywhere blog post was slightly helpful, thanks adrianmak. However, I don't think it's going as deep as I need because it doesn't address the concept of multiple default contexts which is what I'm talking about here. I need each of my context 'sections' to have it's own default rather than just a single sitewide default.
What that post really made me think is that default contexts need to operate one level UP from what I'm assuming (which is called the 'namespace' in version 6.x-2.x). So rather than having a default context per 'attribute' there should be a default per 'namespace'.
Can anyone confirm or deny that?
(changing title to boil down the question)
Comment #5
dsayswhat commentedI've worked with context v.2 and v.3 over the last year...the 'default' option is missing in v.3, in favor of the approach that is shown on the tutorial referenced above. So that article isn't going to be much help...nor am I. I wanted to mention in case there was any confusion for casual readers of this thread.
Unlike v.2, v.3 allows you to set a condition based on the active contexts...so you can say if Context X is active, make this one active too - or you can negate that criteria, so your context will only show when context X is not active. In that sense, Context 3.0 has the 'default' capability, but expressed differently.
I know from experience that under v.2, you can't successfully have two contexts be active at the same time in the same attribute. IN that case, only one will show. Unfortunately I don't have any info on how default contexts work within the same attribute...
In my ignorance of your actual situation, it sounds like the flexibility you want is in Context 3, if you can stand to upgrade...
Comment #6
steven jones commentedThere is some advanced help documentation that comes with Context, that explains how to use the default context in Context 2.x.
You can only have a default context in a namespace + attribute pair, not in a namespace only. That would be a 'default' attribute.
Apologies for the messiness of the implementation, but we have to work with what we've got.