I also have issues with getResources (1.4.0pl, modx revo 2.1.1) and multiple contexts (I use Babel for multilanguage). What I wanted to do is using a single news-sidebar-widget for both languages.
This widget has a getResources call in it with &parents=`5,11` while parent 5 is in context A and parent 11 is in context B. I didn't specify the &context=`` parameter because in the docs it says when not specified the current context is used (while the extras page says if &context is not specified, all context are used...what is right?). I thought, if the current context is used, perfect, that would mean the other context is ignored, but that doesn't seem to be the case.
So what I want is that getResources looks at the context the visitor is in (ie. web or en -> languages) and then only search the parents that are in this context, and not on the other one too...
this would mean that I would have to dynamically change the &context=`` parameter in the getResources call, isn't it? Because when I specify &context=`web,en` both are searched but only one should be searched, when I only specify one, only this one is searched...
so what I did for now is create a very simple snippet called getContext which does return the actual context key with
return $modx->context->get('key');
and inserted this in the in the &context=`` parameter like this...
&context=`[[!getContext]]`
it works as expected and the problem is solved that way, but I just can't believe that I had to make this snippet, is it really not possible to only search the context the getResources snippets gets called in or did I just miss some important detail? Couldn't this easily be added?
Thanks for your reply!