(ERROR @ /index.php) `[[+id]]` is not a valid integer and may not be passed to makeUrl()
<li> <a href="[[~[[+id]]]]" title="[[+longtitle]]">[[!Gallery? &album=`[[+gallery-images]]`&tag=`featured`&limit=`1`&thumbWidth=`250`&thumbHeight=`90`&thumbZoomCrop=`1`&thumbTpl=`ImageTpl`]]</a> <p><a href="[[~[[+id]]]]" title="[[+longtitle]]">[[+longtitle]]</a></p> </li>
if (empty($input)) { return 'This cruiser is so unique, that we don\'t have anything similar to it!'; }
$tpl = $modx->getOption('tpl',$scriptProperties,'RelatedCruisersTpl');
if ($modx->getChunk($tpl) == '') { return 'We found some similar cruisers, but cannot show them at the moment.'; }
$ids = explode(',', $input);
$output = array();
foreach ($ids as $key => $value) {
$resource = $modx->getObject('modResource',array(
'published' => 1,
'id' => $value));
if ($resource instanceof modResource) {
$fields = $resource->toArray();
$fields['gallery-images'] = $resource->getTVValue('GalleryImages');
$output[] = $modx->getChunk($tpl,$fields);
}
}
return implode('',$output);
This question has been answered by BobRay. See the first response.
[[~[[+id]]]]
[[+link]]
$fields['link'] = $modx->makeUrl($value, "", "", "full");
[[[[+id:isnot=``:then=`~[[+id]]`:else=``]]]]
[[[[+id:isnot=``:then=`~[[+id]]`:else=``]]]]
[[~[[+id]]]]