Emiliano Gabrielli wrote: | Still a problem .. sorry:
Options Category = Info,Report,Problem{1},Other
Preset Category = Info
Display Category = <img style="border:0; float:left; margin-right:5px" src="icons/$category.png">$category
{1}ROptions Level = Notice,Warning,Alert,Fixed
{1}Preset Level = Warning
{1}Display Level = <img style="border:0; float:left; margin-right:5px" src="icons/$level.png">$level
when I try to use this featur on a conditional attr it is ignored .. If I remove the {1} it is obviously showed .. but also when no $level is defined (taht is infact not what should be)...
BTW, is it possible to not show conditional attributes in mail and in "single entry" view? .. it's quite strange to ave a "Level" of a "Misure", not a "Problem" 
thank you in advance  |
Well, that's not the way condition attributes are supposed to work. They were designed to modify the new entry input mask, to have diefferent option lists depending on the value of an attribute. But conditional attributes do not have any meaning for normal display and for email notification. This would have to be implemented and is quite some work. So I would put following in your config:
Options Category = Info{1},Report{1},Problem{2},Other{1}
Preset Category = Info
Display Category = <img style="border:0; float:left; margin-right:5px" src="icons/$category.png">$category
{1}ROptions Level = Notice,Warning,Alert,Fixed
{1}Preset Level = Warning
{1}Display Level = <img style="border:0; float:left; margin-right:5px" src="icons/$level.png">$level
{2}Preset Level = N/A
Having N/A is not as nice as having this attribute not shown at all, but that's the only choice one has right now .
Another thing: you maybe realized that putting <img> in the subject of your orignal entry results in a missing image. That's a nasty side effect of your wish to have any <img> interpreted as HTML. Of course you could argue that <img> is not a real HTML statement because the source is missing, but then another one will come and put there a subject like: "I want an <img src="bla.gif"> in my config" and bang, we are back to the same problem. So if anyone has a clever idea of how to solve this, please let me know. Maybe one should be able to put a "\" in front of any code (also the ELCode tags) to not interprete them by the system. But while this is maybe obvious for a C programmer or shell programmer, the normal user might not find this so obvious. |