Change Document Type in Rich Text Schema Field Tridion 2009
Asked Answered
S

2

7

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.

Simas answered 28/1, 2013 at 15:35 Comment(0)
R
7

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.

Refreshment answered 28/1, 2013 at 16:3 Comment(2)
Unfortunately this won't work for us as as we don't have any where to get the data from once the component is saved then the data-attributes are gone completely and we can't specialise the schema to work with a TBB on publish. Thanks anyway.Simas
Of course any template can only work with the XML which Tridion allows you to save. But if your concern is only with displaying some 'mouse over' text, you could use the title attribute of the 'a' element and change it to a data attribute in a template.Refreshment
M
4

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

Musa answered 28/1, 2013 at 19:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.