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.

CommentFileSizeAuthor
cep_node.tgz1.42 KBmhrabovcin

Comments

DjebbZ’s picture

I 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.

chriscalip’s picture

Status: Needs work » Closed (fixed)

thank you mathiaz.sk for your contribution. I added to the latest release.