don't worry, I always have to look up the correct syntax for inline xslt myself as I rarely use it, but from time to time it comes in really handy. The most important part is to know that you can do such a thing, so I wouldn't say that you are not good enough with xslt. ;)
Your initial idea was for 99% of the cases where you have to handle these comma separated values right: you split them with Xslt and act upon each node id/entry. Only in this case there was a nicer and quicker way to do it. :D
How to put space before comma separeted list
Hi, in my docType a have a property (profMatiere) with checkboxes. I call it in my template with the following umbraco:item
So if there's many checkboxes ticked, it gives me this : item1,item2,item3
I'd like to have item1, item2, item3 with a space between the comma and the items. I supposed that it needs a xslt macro, but I don't know more...
Thank you for your advice and help!
Hi Profiterole,
in your case the result can be achieved with a bit of inline Xslt:
<umbraco:Item field="profMatiere" runat="server" textifEmpty="Mathématiques" xslt="Exslt.ExsltStrings:replace({0}, ',', ', ')"/>
That basically replaces each ',' with ', ' in your output string.
Hope that helps,
Sascha
Thank you Sascha. Obvously I'm not enough good in xslt!
Hi Profiterole,
don't worry, I always have to look up the correct syntax for inline xslt myself as I rarely use it, but from time to time it comes in really handy. The most important part is to know that you can do such a thing, so I wouldn't say that you are not good enough with xslt. ;)
Your initial idea was for 99% of the cases where you have to handle these comma separated values right: you split them with Xslt and act upon each node id/entry. Only in this case there was a nicer and quicker way to do it. :D
Glad I could help out,
Sascha
is working on a reply...