Pages: 1
Print
Author Topic: How to set tag colors  (Read 2516 times)
venglisch
Member

Posts: 1


« on: December 12, 2008, 11:31:18 AM »

I have an element that appears multiple times within the document as a child of different parents like this:
  <Parent1>
    <Comment/>
  </Parent1>
  <Parent2>
    <Comment/>
  </Parent2>

I need to set the tag-color (the color the element is being displayed in when in Tag-On view) of the Comment element based on the parent. 
Is there a way to set the tag color like this in the *.ctm custumization file?

I've tried to include the 
  <Parent>Parent2</Parent>
element but both element tags are set to the first color I specified.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1546



WWW
« Reply #1 on: December 17, 2008, 08:52:47 PM »

This is not possible. There is no concept of parent elements when it comes to the coloring of element tags using settings in the CTM file.

If you really need to make it easy to distinguish between elements by color the best you could do in this case would be to change colors using CSS background-color, color or border properties in the CSS file.

A very simple example:

Parent1 Comment {color:#FF0000}
Parent2 Comment {color:#0000FF}
Logged
Pages: 1
Print
Jump to:  

email us