We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36687
    • 24 Posts
    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?
      • 3109 ☆ A M B ☆
      • 894 Posts
      Try targetting it via css first-child selector that should solve your problem.

      Good Luck.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX