I've create module that allows to check if current context is node page with particular node id.
Background:
I had a problem with multilingual content where page node represented landing page for section with language sensitive blocks (views). For view block its easy to setup multilingual support (adding a new filter). Problem was how to setup context condition once for all node translations - because nid and path are different for each translation.
Solution:
I've created new context condition which takes node id as argument. By default it checks if current page argument $node->nid equals to value. Optionally it can lookup also to $node->tnid - original nid from which was current node translated.
I think that this module can be good enhancement of context extra modules.
| Comment | File | Size | Author |
|---|---|---|---|
| cep_node.tgz | 1.42 KB | mhrabovcin |
Comments
Comment #1
DjebbZ commentedI didn't check the code, but you have my vote for getting this into the module. A nid based condition would be very useful in some cases.
Comment #2
chriscalip commentedthank you mathiaz.sk for your contribution. I added to the latest release.