Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
I'm using the TextString Array to store an array of values eg Name/Address/Tel num.
What's the simplest way to display all the values in the array in a template?
Can I directly reference individaul members?
Do I need to use a macro or can I loop through the array directly in a template?
I'm on umbraco 4.7.1
Thanks
Hi Simon,
The data for Textstring Array is stored as XML:
<TextstringArray> <values> <value>hello</value> <value>world</value> </values> <values> <value>foo bar</value> <value>world</value> </values> </TextstringArray>
If you are using XSLT, then you can loop through each of the "values":
<xsl:for-each select="*/TextstringArray/values"> <strong><xsl:value-of select="value[1]" /></strong> <xsl:value-of select="value[2]" /> </xsl:for-each>
If you are using Razor, I'm not 100% sure, think you can loop through using DynamicXml, but I haven't tried that myself.
Cheers, Lee.
Brilliant, thanks.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Using the uComponents TextString Array
Hi
I'm using the TextString Array to store an array of values eg Name/Address/Tel num.
What's the simplest way to display all the values in the array in a template?
Can I directly reference individaul members?
Do I need to use a macro or can I loop through the array directly in a template?
I'm on umbraco 4.7.1
Thanks
Hi Simon,
The data for Textstring Array is stored as XML:
If you are using XSLT, then you can loop through each of the "values":
If you are using Razor, I'm not 100% sure, think you can loop through using DynamicXml, but I haven't tried that myself.
Cheers, Lee.
Brilliant, thanks.
is working on a reply...