I’m about to find a possible fix for your issues.
both of your tasks will not work at this time.
Not the outputfilter nor your snippet, because of prse-ordering as it is now.
for your snippet perhaps you can try to change the function fetch in core/components/wayfinder/wayfinder.class.php
from
public function fetch($tpl){
$template = "";
if ($this->modx->getChunk($tpl) != "") {
$template = $this->modx->getChunk($tpl);
} else if(substr($tpl, 0, 6) == "@FILE:") {
$template = $this->get_file_contents(substr($tpl, 6));
} else if(substr($tpl, 0, 6) == "@CODE:") {
$template = substr($tpl, 6);
} else {
$template = false;
}
return $template;
}
to
public function fetch($tpl){
global $modx;
$template = "";
if ($chunk= $modx->getObject('modChunk', array ('name' => $tpl), true)) {
$template = $chunk->getContent();
} else if(substr($tpl, 0, 6) == "@FILE:") {
$template = $this->get_file_contents(substr($tpl, 6));
} else if(substr($tpl, 0, 6) == "@CODE:") {
$template = substr($tpl, 6);
} else if(substr($tpl, 0, 5) == "@FILE") {
$template = $this->get_file_contents(trim(substr($tpl, 5)));
} else if(substr($tpl, 0, 5) == "@CODE") {
$template = trim(substr($tpl, 5));
} else {
$template = false;
}
return $template;
}