开发者

MODx MIGX variable in json string

开发者 https://www.devze.com 2023-04-13 08:56 出处:网络
I have a little problem with using a variable inside the where-json-string. I\'m running a MIGX getImageList inside an other MIGX getImageList -template.

I have a little problem with using a variable inside the where-json-string. I'm running a MIGX getImageList inside an other MIGX getImageList -template.

[[getImageList? 
&tvname=`migxProducts` 
&where=`{"productGroupName:=":"[[+pr开发者_如何学运维oductGroupName]]","productItemType:=":"product"}` 
&tpl=`migxProductsListRowTpl`]]

It seems that it's the [[+productGroupName]] that breaks it all. I need to use that variable in the where string.

Any clue of what's wrong or if there's a solution?

Thanks in advance.


How are you grabbing your productGroupName variable ? I think you might be mixing MODX tags.

If it's a TV set on the current resource, you might want to use [[*productGroupName]].

If it's pulled from a getResources call, you might want to either make sure the prefix is empty (with the parameter getResources?… &tvPrefix=) or use the default prefix: [[+tv.productGroupName]].

I hope that will help.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号