Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove attributes-on-fly with Diazo

Tags:

plone

diazo

I want to strip the "class attribute" from a tag. What's the best way?

Example:

 <div id="portlets-footer" class="row"> ... </div>

Thank's Vito

like image 984
Vito Avatar asked Jan 30 '12 09:01

Vito


1 Answers

according to the drop's section of the docs [1] you can use "drop" + "attributes":

"If you want to drop attributes instead of whole tags, you can use the attributes attribute to provide a space-separated list of attributes that should be dropped on the matched theme node(s). For example, with attributes="class" the class attribute will be dropped from the matched node(s). Using attributes="class id", the class and id attributes will both be dropped."

[1] http://diazo.org/basic.html

like image 111
simahawk Avatar answered Nov 18 '22 06:11

simahawk