I am a front end developer who uses Tridion from time to time (on a not very technical level) . I am looking for a way to change the document type in the Tridion 2009 rich text schema field to allow me use data-attributes (for a tooltip popover). At the moment the rich text fields are set to be either Strict or Transitional. I need it to be set to HTML5 (I know this can be done in 2011 with some changes. What changes I'm not sure.) As it stands data-attributes are stripped out by default on publish in either of these modes. Selecting HTML5 corrects this issue.
Any help would be greatly appreciated.
The rich text field in 2009 does not allow all this. But you can use a template to transform the field upon publishing. For example: you could take the title attribute on a link and transform it into a data attribute of your choice. I realize it's a bit awkward, but maybe it will do the trick.
You could do this in a C# template or with an XSLT, using the XSLT Mediator.
Could you clarify "front-end" development, please. Are you writing a Tridion GUI or are you writing a web application using content from Trdion?
If the latter, you can certainly transform the RTF content using XPath or XSL before it gets to the app server.
If the former, sounds like an upgrade to 2011 is in order! :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With