-
dynamic style
whether it is possible to dynamically change the style of a component to another style which is not in widget.xml?
or do something like this:
[PHP]...
<parameters>
<parameter name="my_color">
<value>
red
</value>
</parameter>
</parameters>
....
<stylesheet>
tag_item{
color-1: $(my_color);
}
</stylesheet>
....[/PHP]
and then change style by changing parameter "my_color"?
-
Re: dynamic style
Sorry, dynamic properties in styles are not possible as styles are compiled to binary format when uploaded ;(
Only way to change styles would be either to create style for each color you want to use, or to use Canvas component and Graphics to create the whole component from scratch. However this way you would lose all features of the component ;(
At least I have been always able to work with predefined set of styles.
/render