First of all let me say that I absolutely fell in love with the fantastic MIGX addition. We use it to generate cleanly formatted pages. For normal content editor folks it's much more user friendly than the TinyMCE editor on it's own.
But I have some problems with a MIGX template chunk, which gets more and more complex, because it makes heavy use of input/output filters.
My MIGX tv is called like:
[[getImageList? &tvname=`tvInhaltsseiteMIGXHauptinhalt` &tpl=`chkMIGXHauptinhalt`]]
The template chunk "chkMIGXHauptinhalt" contains some if/else statements. Just to give an example (I shortened it):
[[+dateiauswahl:notempty=`
<div class="datei clearfix">
<div class="icon">
<a href="[[+dateiauswahl]]" target="_blank"><img src="[[+icon:is=`pdf`:then=`[[phpthumbof? &input=`assets/templates/img/icons/pdf.png` &options=`&w=60&zc=1`]]`:else=``]][[+icon:is=`rtf`:then=`[[phpthumbof? &input=`assets/templates/img/icons/rtf.png` &options=`&w=60&zc=1`]]`:else=``]][[+icon:is=`zip`:then=`[[phpthumbof? &input=`assets/templates/img/icons/zip.png` &options=`&w=60&zc=1`]]`:else=``]]" width="60" alt="[[+icon:ucase]]" /></a>
</div>
<div class="link">
<a href="[[+dateiauswahl]]" target="_blank">[[+linktext]]</a>[[+beschreibung:notempty=` [[+beschreibung]]`]]
</div>
</div>
`]]
It seems to get more and more confused and clumsy to me...
For example, it's not possible to use placeholders in the phpthumbof call, like
[[phpthumbof? &input=`assets/templates/img/icons/[[+icon]].png` &options=`&w=60&zc=1`]]
Sometimes I have to write ":else=``" at the end of an if/else statement in order to get it work, sometimes not...
I think I would feel more comfortable if I could use a snippet with solid php if/else statements than these MODX input/output filters. My question is: How do I get the output of the MIGX snippet as an useable array to another snippet? I tried:
$output = $modx->runSnippet('getImageList', array(
'tvname' => 'tvInhaltsseiteMIGXHauptinhalt'
));
In this case, $output just contains a string. I would like to get the "real" array and do foreach on each dataset by myself. Is this possible? Are there better alternatives?
Thanks a lot for useful hints.
PS: I have always wondered why there is a property "width" in the MIGX tv's grid column field. What does it do? It seems to have no effect to me.