[support] Set CSS class as taxonomy field for content type

Matthias Fechner idefix at fechner.net
Tue Mar 25 08:25:30 UTC 2014


Am 24.03.14 21:13, schrieb Hummel, Tracey S - (thummel):
> You could add the taxonomy field to the view; under the taxonomy field's Rewrite Rules, select "Rewrite the output of this field".  Use replacement patterns to add the taxonomy term as a CSS class.  Something like;
> <div class="[tax-term-replacement-pattern]">[title]</div>

in this way I can change the class of the field or the div the field is
included.
But the structure views generate is:
<div view>
 <div content>
  <div row1>
   <div field1/>
   <div field2/>
  </div row>
  <div row2>
    ...
  </div row2>
 </div content>
</div view>

If I use the overwrite css class, I can change the class of the field1.
But I would like to change the class of row1, row2, etc. with the value
from field1.

Is there a way to do this, without touching manually the .tpl files?

Gruß,
Matthias

-- 
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook


More information about the support mailing list