Good question! I haven’t found an Airpress method to achieve this, but it is possible using a CSS3 pseudo-element. If you wrap {{Name}} in a set of inline tags (such as span, i or em) it’s possible to add the comma as a pseudo-element via CSS like so:
div.comma-separated-list span:after {
content: ', ';
}
div.comma-separated-list i:last-of-type:after {
content: '';
}
It would be awesome if there were a way to achieve this with Airpress (seems simple enough) but this is a workaround which I’ve used successfully. Hope this helps…
pk
Thanks Pat K for thinking outside the box. I come from a front-end coding background so I like the use of css.
A related question is – can you tell if an [apr] loop is empty? For example I would like headings for different sections but only to display these when the field is not empty.
Another good question! I know exactly what you mean and have run into this myself. There is no Airpress method that I am aware of (I’m sure Chester will chime in if there is). So headings that are followed by empty fields are just that: headings followed by empty fields. I seem to remember trying to use a jQuery filter to address this (removing these headings dynamically) without success. If you find a method to do this, please post your solution!
pk