Hi;
I'm trying to get GetResources returning resources based on content type, I have setup additional content types, created several child static resources for each new content type but seem unable to get the &where getResources parameter to work correctly, here is what I have:
This works:
[[GetResources?
&parents=`[[*id]]`
&showHidden=`1`
&limit=`0`
&where=`{"contentType:=":"image/jpeg"}`
]]
This does not work:
[[GetResources?
&parents=`[[*id]]`
&showHidden=`1`
&limit=`0`
&where=`{"contentType:=":"image/jpeg", "OR:contentType:=":"image/gif", "OR:contentType:=":"image/png"}`
]]
I'm trying to build an automated slider for these pages [basically create a static resource, set the content type & pick the image] so users don't have a lot to do ...
Must be a syntax thing - anyone have any thoughts?
-thanks
-sean
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
You might try using content_type (instead of contentType) and the ID of the content type, not the name (look in the modx_site_content table for the ID).
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODx info for everyone:
http://bobsguides.com/MODx.html
I tried that first - it seems to have something to do with the second 'OR' clause... because this also works:
&where=`{"contentType:=":"image/jpeg", "OR:contentType:=":"image/gif"}`
Still think it has something to do with syntax.
-sean
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
Have you tried &debug=`1`? That will send the SQL query to the log.
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODx info for everyone:
http://bobsguides.com/modx.html
Hi Bob;
re: debug, I have not. will give that a shot
thanks
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525