7

Well I would be super happy if you can help me out with one of my issues.

I am a GUI guy and use Tridion but do not have a great deal of knowledge about it.

1) Can we have 2 classes in one option in the dropdown?

For example can we have the following 2 values in the dropdown? If so how?

  • important warning
  • important information

Suppose i select "important warning" can we have the tag like:

<a href="#" class="important warning"> Your message would be deleted !! </a>

2) Can we add 2 classes when we select a particular option from the dropdown?

For example can we have these 2 values in the dropdown? If so how?

  • warning
  • information

Suppose I select "warning" can we have the tag like:

<a href="#" class="important warning"> Your message would be deleted !! </a>

I would be really grateful if you can help out.

2
  • Welcome to the Tridion Stack Exchange! I have edited your question slightly to hopefully better clarify what you are asking. If you disagree with the edits please feel to roll them back. Commented May 29, 2013 at 13:45
  • well its kewl.... thanks :) it looks much more readable now :)
    – Vipin
    Commented May 29, 2013 at 14:08

2 Answers 2

10

You could handle this with Filtering XSLT by having a single class important-warning which gets transformed on component save into two classes. See this question for an example: Using XSLT within Schema to manipulate HTML output from Component

Alternatively you could do the same in your templates.

2
  • Thank.. Seems like tridion wont help me out :) i think i would work on the XSLT.
    – Vipin
    Commented May 29, 2013 at 12:43
  • Client-side script is one more option, depending on where the transformation needs to happen (and who controls it). Templates may be a slightly better choice if different pages or sites needed different CSS classes. Commented May 30, 2013 at 0:55
2

Following could be the options:

  1. Have a Single Class depicting the important warning (you may create a class like important-warning as suggested by Rob or you may choose any other name for sake of it like ImpWarn, ImportantWarning). Use Filtering XSLT in the corresponding Schema and write an XSLT to transform this class to "Important Warning".
  2. In case it is not viable to change the Schema or you do not have an expertise in XSLT, you may try to ignore the Design tab for such code and go to the Source Tab of your RTF field and write whatever HTML code you may want to write there.

I hope it helps

1
  • You both are right... On point (2) I cant change the source though cuz this is something that the end users might doing. so i cant control it. Thanks for the reply.
    – Vipin
    Commented May 29, 2013 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.