Concerning [+wf.docid+], you’re right of course. It doesn’t mean anything for the outer template. It should be [*id*].
I have done some investigation now. I find that an uncacheable snippet call, [!UltimateParent!] on its own within the outer template works. However, when used within a cacheable YAMS snippet call I don’t get any wayfinder output at all. That’s because the cacheable YAMS snippet call is getting evaluated before the uncacheable UltimateParent snippet call within the MODx evalSnippet method. That probably means that YAMS is not using the method correctly. I’ll have to do some more investigation to get to the bottom of this.
In the meantime, yes, you could get around this by creating your own snippet based on the YAMS one located at assets\modules\yams\yams.snippet.inc.php. It will look something like this (untested):
// Define the yams class
require_once( $modx->config['base_path'] . 'assets/modules/yams/class/yams.class.inc.php' );
// Get an instance of the YAMS class
$yams = YAMS::GetInstance();
// Define the parameters, required by the YAMS snippet...
$get = 'data';
$from = 'pagetitle';
// Run the UltimateParent snippet to get the $docid
$docid = $modx->runSnippet( 'UltimateParent', array() );
$beforetpl = NULL;
$repeattpl = NULL;
$currenttpl = NULL;
$aftertpl = NULL;
// Call the YAMS snippet to generate the multilingual output...
return $yams->Snippet(
$get
, $from
, $docid
, $beforetpl
, $repeattpl
, $currenttpl
, $aftertpl
);