I'm messing arround with MIGXdb for the first time and and setting up tables and schemas worked like a charm. This is a great enhancement for modx!
Working on some frontpage things I'm facing a few obstacles I want to discuss.
&where Parameter
---------------------------
I need to check if a Multiselect TV inside a MIGXdb grid field contains the value "29"
As some fields contain more than one value, I can't use a simple IS condition.
Inside the DB both values are seperated by a double pipe (29||49) and as the TV is set to output a comma delimited list the placeholder output is as expected: 29,49
I tried to use "find", "ia" or "find_pd" (migx.class.php line 1205+) to get this particular row by searching for "29", but without any success.
Fortunately the &where parameter seems to understand SQL:
&where=`{ "published:=":"1" , "resource_ids:LIKE":"%49%" }`
As far as I understand the where syntax from getImageList is not fully implemented into MIGXdb. Is this correct?
&docid parameter
--------------------------
I try to get a some results from a different resource. but I never get a result in return.
Example: I have 10 rows in a table that point to resource no. 1 inside resource_id. They can be seen and edited inside the TV. It's also possible to output them if you render resource no. 1.
Now I want to output them in resource no 2. As far as I understand this is where the &docid paramter comes in.
Example:
[[!migx?
&configs=`migx_obDB`
&docid=`1`
&tvname=`migxDB`
&tpl=`migxDB.Verkauf.tpl`
&where=`{"published:=":"1","resource_ids:LIKE":"%49%"}`
]]
If I call this snippet from Resource no. 1. I get the expected result. If I change the docid Parameter to something else this has no impact on the result. I stil get the same output.
If I call the snippet from resource no 2 I don't get anything at all.
This is also true for any use of &docidVarKey and any URL parameter. They are ignored.
The only thing I seem to be able to do is with the migx snippet to output results in their "home" resource.
What Am i missing here?
Regards,
pepebe
[ed. note: pepebe last edited this post 11 years, 8 months ago.]