<![CDATA[ migxloopCollection > @Field: does it work and if how? - My Forums]]> https://forums.modx.com/thread/?thread=103092 <![CDATA[migxloopCollection > @Field: does it work and if how?]]> https://forums.modx.com/thread/103092/migxloopcollection-field-does-it-work-and-if-how#dis-post-554933
i use migxloopcollection to get a list of resources. i would like to use different templates for each item.
getImageList has the option &tpl=`@Field:…`

I tried to use it for migxloopcollection, but it doesn't work. Now i am not sure if it is not supported or if i am doing something wrong (i tried it first with one item):

The Snippet Call
[[!migxLoopCollection?
		&classname=`modResource`
		&joins=`[
{"alias":"presentationStyle","classname":"modTemplateVarResource","on":"presentationStyle.contentid=modResource.id AND presentationStyle.tmplvarid=46"}
		]`
		&selectfields=`id,pagetitle,introtext`
			
		[[- <!-- search -->]]
		&where=`[
			{"published":"1"},
			{"parent":"[[*id]]"},
			{"template:=":"10","OR:template:=":"12","OR:template:=":"11"}
		]`
			
		[[- <!-- sort -->]]
		&sortConfig=`[{"sortby":"menuindex","sortdir":"ASC"}]`
		
		&tpl=`@Field:presentationStyle.value`
	]]


The Result for presentationStyle.value
product-listing-default

The name of the chunk
product-listing-default

tried it with this &where to check presentationStyle.value (delivers the right result)
[[- <!-- search -->]]
		&where=`[
			{"published":"1"},
			{"parent":"[[*id]]"},
			{"template:=":"10","OR:template:=":"12","OR:template:=":"11"},
			{"presentationStyle.value:=":"product-listing-default"}
		]`
]]>
stefan79w Nov 03, 2017, 01:11 PM https://forums.modx.com/thread/103092/migxloopcollection-field-does-it-work-and-if-how#dis-post-554933
<![CDATA[Re: migxloopCollection > @Field: does it work and if how?]]> https://forums.modx.com/thread/103092/migxloopcollection-field-does-it-work-and-if-how#dis-post-554970

Thanks!!!]]>
stefan79w Nov 06, 2017, 08:22 AM https://forums.modx.com/thread/103092/migxloopcollection-field-does-it-work-and-if-how#dis-post-554970
<![CDATA[Re: migxloopCollection > @Field: does it work and if how?]]> https://forums.modx.com/thread/103092/migxloopcollection-field-does-it-work-and-if-how#dis-post-554951
{"template:=":"10","OR:template:=":"12","OR:template:=":"11"}


use this:

{"template:IN":[ 10,11,12 ]}
]]>
Bruno17 Nov 04, 2017, 11:19 PM https://forums.modx.com/thread/103092/migxloopcollection-field-does-it-work-and-if-how#dis-post-554951
<![CDATA[Re: migxloopCollection > @Field: does it work and if how? (Best Answer)]]> https://forums.modx.com/thread/103092/migxloopcollection-field-does-it-work-and-if-how#dis-post-554950
@FIELD:presentationStyle_value
]]>
Bruno17 Nov 04, 2017, 11:17 PM https://forums.modx.com/thread/103092/migxloopcollection-field-does-it-work-and-if-how#dis-post-554950
<![CDATA[Re: migxloopCollection > @Field: does it work and if how?]]> https://forums.modx.com/thread/103092/migxloopcollection-field-does-it-work-and-if-how#dis-post-554949
try :
@FIELD:
not
@Field:
]]>
Bruno17 Nov 04, 2017, 11:15 PM https://forums.modx.com/thread/103092/migxloopcollection-field-does-it-work-and-if-how#dis-post-554949