Answer the question
In order to leave comments, you need to log in
[[+content_image]]
How to display your placeholders in AdvSearch results?
Calling up a search results snippet on a page
[[!AdvSearch?
&queryHook=`testHook`
&fields=`id,name,active,description`
&withFields=`id,name,active,description`
&init=`all`
]]
$main = array(
'package' => 'links',
'packagePath' => '{core_path}components/links/model/',
'class' => 'LinksItem',
'fields' => 'id,name,active,description', // displayed
'withFields' => 'name,active,description', // where we do the search
);
// set the query hook declaration
$qhDeclaration = array(
'qhVersion' => '1.3', // version of queryHook - to manage futures changes
'main' => $main,
);
/** @var TYPE_NAME $hook */
$hook->setQueryHook($qhDeclaration);
return true;
[[+advsearch.id]]
[[+advsearch.name]]
[[+advsearch.description]]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question