Thank you Bruno,
The problem I was having was that a "Resource List" TV type just outputs the ids, so I couldn’t have the pagetitle included in the option string and I was trying to get it from within the (grid) rendering function. I’ve resorted to using a standard drop down list TV with a snippet to output the relevant resources in the pagetitle:id format as you suggested.
<?php
$parent=$modx->getOption('parent',$scriptProperties,'0');
$sortby=$modx->getOption('sortby',$scriptProperties,'pagetitle');
$c = $modx->newQuery('modResource');
$c->where(array('parent'=>$parent));
$c->sortby($sortby);
$collection = $modx->getCollection('modResource',$c);
$output='kein Partner==0';
foreach ($collection as $o){
$output .= '||'.$o->get('pagetitle').'=='.$o->get('pagetitle').':'.$o->get('id');
}
return $output;@EVAL return $modx->runSnippet('getResourceList',array('parent'=>'3'));
it is possible to use the inputTV with autoTag ?
Hi Lee,
when you use ’image’ as inputTV you need to create another TV, which is a image-TV with name image.
You should not assign this image-TV to any template.
[
{"caption":"Info", "fields": [
{"field":"title","caption":"Title"},
{"field":"body","caption":"Body"},
{"field":"linkLabel","caption":"Link Label"},
{"field":"linkUrl","caption":"Link URL","inputTV":"URL"}
]},
{"caption":"Image", "fields":[
{"field":"image","caption":"Image","inputTV":"image"}
]}
]
And created an unused TV, called linkUrl with type URL, just in case that’s needed.
{"field":"linkUrl","caption":"Link URL","inputTV":"linkUrl"}This discussion is closed to further replies. Keep calm and carry on.