Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Document Type in Rich Text Schema Field Tridion 2009

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.

like image 288
frontendzzzguy Avatar asked Jan 28 '13 15:01

frontendzzzguy


2 Answers

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.

like image 158
Quirijn Avatar answered Nov 03 '22 09:11

Quirijn


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! :-)

like image 32
Chris Warner Avatar answered Nov 03 '22 10:11

Chris Warner