I’m a novice with Modx and I’m hoping someone can help me. I’m trying to use Wayfinder to output a simple comma delimited string. I don’t want a comma after the last item.
Here’s my code:
[[Wayfinder? &startId=`755` &includeDocs=`[*nhs_std-colors*]` &outerTpl=`wfBlank` &rowTpl=`NBidPageTitle2` &ignoreHidden=`TRUE` &lastClass=`hide`]]
wfBlank is:
[+wf.wrapper+]
NBidPageTitle2 is:
[+wf.title+]<span[+wf.classes+]>,</span>
.hide is:
.hide { display: none; }
This works great and the last comma is hidden provided there are at least two items in the list. However, when there is only one, the comma still shows. Any ideas?
-
☆ A M B ☆
- 894 Posts
Try targetting it via css first-child selector that should solve your problem.
Good Luck.