Is it possible to have the Value field of the NAME-VALUE list as the RichText?
Our Requirement is to provide the HTML content in the Value field and render in the webpage as HTML.
Sitecore Stack Exchange is a question and answer site for developers and end users of the Sitecore CMS and multichannel marketing software. It only takes a minute to sign up.
Sign up to join this communityIs it possible to have the Value field of the NAME-VALUE list as the RichText?
Our Requirement is to provide the HTML content in the Value field and render in the webpage as HTML.
While it may be possible to tweak some stuff around to make it seem like it works, I doubt it would really be a solution for you in the long run.
Internally, a Name Value Field
stores its value as an UrlString
. As such there are limitations to both length and actual content you can put in the field.
The raw value of Name Value List is stored in a url string format – value_1=20.5&value_2=21.5&value_3=22.5&value_4=23.5&value_5=24.5.
And in code, when reading the field value:
string _urlParamsToParse = item["NameValueListFieldName"];
NameValueCollection nameValueCollection = Sitecore.Web.WebUtil.ParseUrlParameters(_urlParamsToParse);
You should probably re-visit whatever requirement it is, you're pursuing.