Hi,
i have a problem with AdvSearch.
the Hook works fine without extended fields
$main = array(
'package' => 'modx',
'packagePath' => '{core_path}model/',
'class' => 'modUser',
'fields' => 'username',
'withFields' => 'username'
);
$joined = array(
array(
'package' => 'modx',
'class' => 'modUserProfile',
'packagePath' => '{core_path}model/',
'fields' => 'zip, city',
'withFields' => 'zip,city',
'joinCriteria' => 'modUser.id = modUserProfile.internalKey'
)
);
but when i try the following hook then i have no output.
(color is an extended field)
$main = array(
'package' => 'modx',
'packagePath' => '{core_path}model/',
'class' => 'modUser', // you use the modUser resource as main resource
'fields' => 'username', // displayed
'withFields' => 'username', // where we do the search
'sortby' => 'modUser.username DESC'
);
$joined = array(
array(
'package' => 'modx',
'class' => 'modUserProfile',
'packagePath' => '{core_path}model/',
'fields' => 'zip, city',
'withFields' => 'zip,city,color',
'joinCriteria' => 'modUser.id = modUserProfile.internalKey'
)
);
It's possible to get extended fields with AdvSearch?
Thanks for any ideas!