The easiest way that I can think of to have Wayfinder work in your other site is to make the following hack to the Wayfinder code.
assets/snippets/wayfinder/wayfinder.inc.php
Right the "run()" function around line 46, change:
ksort($this->docs);
$output = $this->buildMenu();
return $output;
To this:
ksort($this->docs);
$output = $this->buildMenu();
$this->writeToFile($modx->config['base_path'] . 'assets/snippets/wayfinder/output.txt',$output);
return $output;
Then right before the last closing bracket at this function:
function writeToFile ($wxUpdateFile, $wxWrittenInfo) {
// Let's make sure the file exists and is writable first.
if (is_writable($wxUpdateFile)) {
if (!$handle = fopen($wxUpdateFile, 'w')) {
exit;
}
// Write content to our opened file.
if (fwrite($handle, $wxWrittenInfo) === FALSE) {
exit;
}
fclose($handle);
}
return;
}
Next you need to create a text file in assets/snippets/wayfinder called output.txt and CHMOD it to 666.
That will give you the menu code in a text file. All you need to do now is do an include(URL_TO_OUTPUT.TXT) in your php file and it will have the same code as your menu on MODx.
Of course this will add a little overhead to the Wayfinder script, and you might want to make this a parameter to Wayfinder.