@prioritypie
before i uploaded your version, i checked your code (modxlink.php) a little bit and i found 3 lines of code in the first minute that you should fix:
line 10, always put your defines in quotation marks:
define(MODX_API_MODE,TRUE);
to
define('MODX_API_MODE',TRUE);
line 91, wheh you output something to javascript, please always strip quotation marks, if you use them to build arrays
modx supports quotation marks in the pagetitle, so please strip them out or you get an javascript error for sure:
'text' => str_repeat($this->indentor, $index) . $item['pagetitle'],
to
'text' => str_repeat($this->indentor, $index) . str_replace('"','',$item['pagetitle']),
line 263, $this surely can not work outside of the class:
$selectItems = $this->FormatArray($pagesList);
to
$selectItems = $Viewer->FormatArray($pagesList);
i fixed this 3 things in my copy and it works like a charm
good job
when i have the free time, i'm looking forward to clone your little project and combine this with an ajax search or the modx cache, to load the resources faster
but anyways, its the best solution at the moment, thank you
best regards
fk_abs
[ed. note: fk_abs last edited this post 10 years, 8 months ago.]