> if contentvariable.size then

Apart from the problem you described, this code will always
resolve to true: zero is true, not false. You could use
"contentvariable.empty?" instead.

gegroet,
Erik V. - http://www.erikveen.dds.nl/