Hey Bob. Like your book cover?
Anyway, sorry, I may not have explained it well..
I have a TV using "Resource List" as the Input Type.
Option values is
@EVAL return $modx->runSnippet('findBy', array('param' => 'alias', 'value' => 'Modules', 'return' => 'id'));
findby is returning the ID of the resource named "Modules" in this case.
My problem is, there is a Resource container called "Modules" for each Context. So, when you use this TV, the Resource List grabs the first Modules ID it finds in the database, not necessarily the one that pertains to the Context of the Resource you’re edting.
Maybe this will help:
Let’s say this is my tree:
Context: chicago
-- Resource: Chicago Home (14)
-- Container: Modules (15)
---- Resource: Photo Rotator (16)
Context: newyork
-- Contaienr: New York Home (19)
-- Container: Modules (20)
---- Resource: Specials (21)
When I edit "Chicago Home", it uses the TV called "module" which has the EVAL statement I posted above. It queries the db, finds "Modules" and returns 16 just like it should, so the Resource List shows (in this case) "Photo Rotator"
However, when I edit "New York Home" which also uses "module, it queries, but since it’s searching global and not context-specific, it also returns 16, since that is the first mention of "Modules" in the database.
I need a way for it to return 20.. so that when using the "module" TV in "New York Home", it returns the Resource List for the Module container in that Context.
Hope that makes more sense