I am not shure about getResources.
I have search form
<form id="search-global-form" class="form-search" action="[[~[[+landing:default=`[[*id]]`]]]]" method="[[+method:default=`get`]]">
<input type="text" class="input-big search-query" name="[[+searchIndex]]" id="[[+searchIndex]]" value="[[+searchValue]]" autocomplete="off" data-provide="typeahead"
data-items="4" data-source='[ [[getPagetitles? &parents=`8,9`]] ]'/>
<input type="hidden" name="id" value="[[+landing:default=[[*id]]]]" />
<button type="submit" class="btn" value="">Search</button>
</form>
Search work with suggests like in Google, all suggest coming from Pagetitle, but i need to get this suggests from two TV's
Here example for Snippet that gets pagetitles
<?
/* getPagetitles snippet
use: [[getPagetitles? &parents=`parentsIDs`]] */
if (!$parents) return;
$res = $modx->getCollection('modResource',array('parent:IN' => explode(',', $parents)));
$output = '';
foreach ($res as $v) {
$output.= '"'.$v->get('pagetitle').'",';
};
$output = substr($output,0,-1);
return $output;
Quote from: sottwell at Jul 25, 2013, 06:34 AMYou can't just use getResources (or pdoResources) with &includeTVs and &includeTVList?