Trying to visually separate data output, that should not show, if data field is empty
This is not really a Dreamweaver question, but maybe someone could help me, so here it goes:
I have an online shop with catalogue and detail pages. The products offered consist of up to five components. Each of these components has its own data field. On the detail page they are listed in a column. On the catalogue page I do not want to waste vertical space and therefore list them separated by commas (this is how it used to be, until I split up the contents in different data fields to be able to list them in a column on the detail page).
So, when I insert a comma between the data fields, not as a surprise these commas will show up also for products, that have less than 5 components. This looks especially silly for products that don't list any components (5 commas in a row).
I tried forced space (with option+space), but the separation still does not look good.
Is there a way to maybe include the comma into the data set, or have a comma only be visible, if the following data field is not empty?