There’s probably 4 different ways you can achieve this, I think
1. If the "buy now" menu link is the
last item in the menu, you can use the wayfinder class parameter
&lastClass. The only thing to remember here is that this lastclass will be applied to all last items in all levels - meaning, menus, sub-menus, etc....So, if you have sub-menus, this may not work for you since your class will be applied to all last items at all levels. If you want to use this method you specify it like this in your wayfinder call:
WF will output the menu like so:
<ul>
<li >First Item</li>
<li >Second Item</li>
<li class="buynow">buy now</li>
</ul>
2. You can use the
&firstClass, which you can guess does the opposite of &lastClass - it will appear in the first menu item, but again, at all levels. So, if you have sub-levels - sub-menus, it will appear there too.
In the above two examples, the CSS class name specified in these parameters will appear in the
[+wf.classes+] and
[+wf.classnames+] placeholders. If you have read the documentation, you will know that these placeholders are placed in your WF templates (chunks)
3. The third method involves giving your menu items unique ids. The problem with this approach is that all your menu items will have ids even if you won’t be referencing them in you CSS. In your case, you will only be interested in the id for the "buy now" menu item. The position of the "buy now" link does not matter in this case. If you decide to do it this way, you use the parameter
&rowIdPrefix.
example
will output the following for doc # 29: id="topMenu29"
So, something like this will be output:
<ul>
<li id="topMenu14">First Item</li>
<li id="topMenu25">Second Item</li>
<li id="topMenu29">buy now</li>
</ul>
So, all you menu items will have unique ids prefixed with "topMenu" , e.g. topMenu31, topMenu67, etc. The 31 and 67 are document ids in the tree. You will then be able to reference the "buy now" menu item in your CSS
What you specify in this parameter, WF will place where you have the
[+wf.id+]placeholder in your template chunks.
4. The fourth method is a bit tricky and I am not sure about it. It involves playing around with the WF placeholders and referencing that as a class in your WF template chunks. Forget about this one for now
I have a feeling this is not very clear...coz I have to rush out...hope it helps.
Suggestion: Download
this WF document. It will help immensely
cheers and welcome to modx!
/k