Categories > TinyButStrong general >

remove element when tbs tag inside was empty

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: RwD
Date: 2005-01-19
Time: 22:15

remove element when tbs tag inside was empty

Suppose I have the following template code
<input class="button" type="button" value="[var.buttonDelete;magnet=input]">
and I want to have the input element not be there when the value of buttonDelete is empty. How do I do that?

For some reason tbs seems to assume there has to be a closing tag when it is in fact forbidden for the input element to have a closing element in a strict dtd....
By: RwD
Date: 2005-01-19
Time: 22:17

Re: remove element when tbs tag inside was empty

(Ow, forgot to mention that I am using an unwanted method right now)

<span><input class="button" type="button" value="[var.buttonDelete;magnet=span]"></span>
By: Skrol29
Date: 2005-01-19
Time: 22:36

Re: remove element when tbs tag inside was empty

Parameter 'mtype' enables you to define what type of magnet it is.

<input class="button" type="button" value="[var.buttonDelete;magnet=input;mtype=m*]">
By: RwD
Date: 2005-01-20
Time: 08:42

Re: remove element when tbs tag inside was empty

Sorry, bad reading of the manual on my part. I read "remove everything that is before the field. To me that did not include the element the field is in. Sorry...