produces the property type for the macro on the template as string, so I know that I am correctly inserting the Macro, just cant seem to get any values from the macro to appear.
- also there is no errors, just no values from the array
I've noticed that when textstring array is used in a Media item all that is returned from that property is a string. I did find a way to convert it into a List but I wish it would just automatically return it... Not sure why the Media section would return different results then the Content section.
umbraco.cms.businesslogic.Content mediacontent = new umbraco.cms.businesslogic.Content(media.Id); var deserializer = new JavaScriptSerializer(); var items = deserializer.Deserialize<List<string[]>>(mediacontent.getProperty("textstringarrayprop").Value.ToString());
textstring array razor macro uComponents
using the documented example from ucomp's site. Perhaps I am missing something - (textstringArrayPropertyAlias, is changed to my parameter alias)
my issue is that it is not returning anything... ive tried a number of things,
produces the property type for the macro on the template as string, so I know that I am correctly inserting the Macro, just cant seem to get any values from the macro to appear. - also there is no errors, just no values from the array
any pointers?
(umbraco 6.1.4, uComponents_5.5.0, IIS 7.0, .NET VersionASP.Net 4.0/4.5)
Thanks guys!
Marc
Hi Marc,
If you output just
@Model.textstringArrayPropertyAlias
what is displayed?I'm hoping it's a
List<string[]>
(or similar)Thanks, Lee.
Hi Lee! Wow thanks for the response.
I unfortunately do not get anything.. when I output
@Model.textstringArrayPropertyAlias
but I do get the value of the propertyType alias when I use:
So the implementation is exactly what you have in your demo and documentation for the text string Array data type. http://ucomponents.org/data-types/textstring-array/
2 fields,
it should be a
List<string[]>
but its strangely not liking the razor macro.for completeness here are all the areas touched for this section:
Sorry if this overkill - but I wanted to include for completeness
razor macro insertion
thanks again for your help
Marc
I've noticed that when textstring array is used in a Media item all that is returned from that property is a string. I did find a way to convert it into a List but I wish it would just automatically return it... Not sure why the Media section would return different results then the Content section.
is working on a reply...