Hello,
i have a case where a string property containing a closing-tag must have the flexibility to appear anywhere on the page. I have tried using javascript but because it is a closing tag, the javascript has problems handling this.
I was wondering if anyone could help me with this. The idea would be, that in one of the properties of a page i'd insert
and then somehow my property should be appended after this.
anyone know how this can be achieved?
My first reaction is. Why oh why? This seems like a very strange thing to do, adding html code into a text-property is generally a bad idea (unless it's the episerver editor ofcourse). The best way to add something to a property is when it's being saved. Create your own custom property deriving from, for example PropertyLongString, and process the input when the property is saved, this way you're doing it once in one place and it will not affect the general performance of your site. Fairly simple solution. However, it sounds to me like the "problem" you are trying to solve with appending code is the real problem. Having editors, or anyone else for that matter, write HTML is a very bad idea and defeats the whole purpos of Episerver or any other CMS. One misstake and the whole site could render like in Netscape 3.1 Gold.
// Björn Sållarp
Avantime AB