Possible solution?
I keep thinking there has to be an easier way, however, here’s how I got this working.
1. Add &rowIdPrefix with content `hnav`to WayFinder horizontal menu call.
2. Add to Row template [+wf.id+]
This combination creates <li id=’hnav
number where number is the links doc ID, e.g. Products = 3. When the menu is focused, of course, the ’current’ class runs the highlighting so it is irrelevant.
Now create a Snippet. I called mine Parent.
<?php
$output='';
$parentId=$modx->runSnippet('UltimateParent');
$cssref='#hnav'.$parentId;
$output.='<style>'.cssref.' a{background:url("images/menu_2ag.gif") no-repeat !important;}'.cssref.' a b{background:url("images/menu_2g.gif") right top !important;}</style>';
return $output;
?>
Go to the template for the pages, and add [[Parent]] directly above the horizontal menu Wayfinder call.
Now when a page is called these 2 css rules are created. They are, of course only applied when relevant, that is from a child page setting the horizontal manu item to a visibly selected status. By the by there are two entries because I’m using a sliding doors technique if I wasn’t then it would be one call per menu item.
Originally I posted an if.. endif construct but then sorted out the direct variable call and concatenation, so I’ve amended the post to reflect this, though it definitely included righteous swearing, ha.. Christian Bale’s got nothing on me.
Regards
/edit amended php code from if.. endif construct to single variable driven selector//