<![CDATA[ Odd issue with MIGX - MODX Community Forums]]> https://forums.modx.com/thread/?thread=78950 <![CDATA[Re: Odd issue with MIGX]]> https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-439620 Quote from: Bruno17 at Oct 10, 2012, 01:38 PM
you can not use @CODE in all situations, because of parsing order. For example when you are using output-filters like phpthumbof.
They will not work, when using @CODE

&resid was a example how you can add your own properties and use them in the chunk with
[[+propery.yourownproperty]]


In this case you could of course also use
[[+property.docid]]

Thanks for info Bruno.]]>
tomahl Oct 10, 2012, 08:41 AM https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-439620
<![CDATA[Re: Odd issue with MIGX]]> https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-439619
MIGX doesn't behave the same way when using @CODE instead of a chunk based template. In one of my projects I changed from @CODE-tpl to a chunk based tpl and suddenly all my cache problems was gone. smiley

I still don't have to declare &pagetitle in the MIGX call to use it in my new template.]]>
tomahl Oct 10, 2012, 08:39 AM https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-439619
<![CDATA[Re: Odd issue with MIGX]]> https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-439618 They will not work, when using @CODE

&resid was a example how you can add your own properties and use them in the chunk with
[[+propery.yourownproperty]]


In this case you could of course also use
[[+property.docid]]
]]>
Bruno17 Oct 10, 2012, 08:38 AM https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-439618
<![CDATA[Re: Odd issue with MIGX]]> https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-439614 Quote from: Bruno17 at Aug 29, 2012, 12:34 PM
if you want to use fields of getResources in the MIGX-tpl you need to put them to the getImageList - call as properties like that:

[[!getImageList?
&tvname=`migx-image-gallery`
&tpl=`migx-gallery-tpl`
&docid=`[[+id]]`
&limit=`1`
&resid=`[[+id]]`
&content=`[[+content]]`
&pagetitle=`[[+pagetitle]]`
]]


Then it should be possible to get them with

<li data-id="term-[[+idx]]" data-value="[[+property.pagetitle]]">
    <figure>
        <img src="[[+project-image:phpthumbof=`w=230&h=230`]]" alt="[[+property.pagetitle]]" />
        <div class="work_overlay">
            <div class="work_title">
                <h2><a href="[[~[[+property.resid]]]]">[[+property.pagetitle]]</a></h2>
                [[+property.content]]
                <a href="[[~[[+property.resid]]]]"><div class="work_view" data-id="[[+idx]]"></div></a>
            </div>                                   
        </div>
    </figure>
</li>




Is the situation any different if you're using @CODE instead of a MIGX-tpl? Why I'm asking is because I'm using @CODE and can use the
[[+pagetitle]]
without declaring it in the MIGX call.

Also. What is "&resid" can't find that in documentation?]]>
tomahl Oct 10, 2012, 08:29 AM https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-439614
<![CDATA[Re: Odd issue with MIGX]]> https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-435074
Thanks again.]]>
benmarte Aug 29, 2012, 08:23 AM https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-435074
<![CDATA[Re: Odd issue with MIGX]]> https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-435072
[[!getImageList?
&tvname=`migx-image-gallery`
&tpl=`migx-gallery-tpl`
&docid=`[[+id]]`
&limit=`1`
&resid=`[[+id]]`
&content=`[[+content]]`
&pagetitle=`[[+pagetitle]]`
]]


Then it should be possible to get them with

<li data-id="term-[[+idx]]" data-value="[[+property.pagetitle]]">
    <figure>
        <img src="[[+project-image:phpthumbof=`w=230&h=230`]]" alt="[[+property.pagetitle]]" />
        <div class="work_overlay">
            <div class="work_title">
                <h2><a href="[[~[[+property.resid]]]]">[[+property.pagetitle]]</a></h2>
                [[+property.content]]
                <a href="[[~[[+property.resid]]]]"><div class="work_view" data-id="[[+idx]]"></div></a>
            </div>                                   
        </div>
    </figure>
</li>



]]>
Bruno17 Aug 29, 2012, 07:34 AM https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-435072
<![CDATA[Re: Odd issue with MIGX]]> https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-435067

<li data-id="term-[[+idx]]" data-value="[[+pagetitle]]">
    <figure>
    	<img src="[[+project-image:phpthumbof=`w=230&h=230`]]" alt="[[+pagetitle]]" />
    	<div class="work_overlay">
    		<div class="work_title">
    			<h2><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2>
    			[[+content]]
    			<a href="[[~[[+id]]]]"><div class="work_view" data-id="[[+idx]]"></div></a>
    		</div>									
    	</div>
    </figure>
</li>


Thanks again]]>
benmarte Aug 29, 2012, 06:43 AM https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-435067
<![CDATA[Re: Odd issue with MIGX]]> https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-435063 easylancer Aug 29, 2012, 06:09 AM https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-435063 <![CDATA[Odd issue with MIGX]]> https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-435039
MIGX is returning each image but it's only returning the pagetitle and content of the first record.

Here is the page rendered with the tpl I'm using.

http://thealogroup.com/teach-training-and-education/

As you can see my tpl is being applied but it's not returning all the info for the second and third item.

Here is another page without the tpl same exact getResources and MIGX calls.

http://thealogroup.com/migx-no-tpl

Here you can see my getResources call and MIGX are both returning all the data but for some reason when using the tpl it only works on the first MIGX record.

Here is my getResources call:

[[!getResources? 
&parents=`[[*id]]`  
&tpl=`getresources-migx-tpl` 
&includeTVs=`1` 
&processTVs=`1` 
&includeContent=`1` 
&showHidden=`1` 
&limit=`0`]]


This is my the getresources-migx-tpl:

[[!getImageList? 
&tvname=`migx-image-gallery` 
&tpl=`migx-gallery-tpl` 
&docid=`[[+id]]` 
&limit=`1`]]


And my migx-gallery-tpl:

 <li data-id="term-[[+idx]]" data-value="[[+pagetitle]]">
    <figure>
    	<img src="[[+project-image:phpthumbof=`w=230&h=230`]]" alt="[[+pagetitle]]" />
    	<div class="work_overlay">
    		<div class="work_title">
    			<h2><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2>
    			[[+content]]
    			<a href="[[~[[+id]]]]"><div class="work_view" data-id="[[+idx]]"></div></a>
    		</div>									
    	</div>
    </figure>
</li>


Any help would be greatly appreciated.

Thanks.]]>
benmarte Aug 28, 2012, 10:44 PM https://forums.modx.com/thread/78950/odd-issue-with-migx#dis-post-435039