FabryShock Reply #1, 7 months, 1 week ago
In the wiki http://wiki.modxcms.com/index.php/AjaxSearch is explained how to use this function, but i'am not able to do it...
In the wiki:
Line to add in the input layout template:
Code to add to config file:
Modx encountered a error when add the function to config file:
Cannot redeclare function travel() in .../assets/snippets/ajaxSearch/configs/default.config.php
How can i solve it
?
many thx
In the wiki:
Line to add in the input layout template:
<li><input type="radio" id="subSearch1" name="subSearch" value="travel,1" [+as.subSearch1Checked+] /><label for="subSearch1">Travel pictures gallery</label></li>
Code to add to config file:
function travel(){
$config = array();
// travel search definition
$config['documents'] = '104';
$config['whereSearch'] = 'content:alias|jot|maxigallery';
$config['extract'] = '0';
$config['breadcrumbs'] = 'Breadcrumbs,showHomeCrumb:0,showCrumbsAtHome:1';
return $config;
}
Modx encountered a error when add the function to config file:
Cannot redeclare function travel() in .../assets/snippets/ajaxSearch/configs/default.config.php
How can i solve it
?many thx