It looks like you've only posted a snippet of your code, or if that is not the case you are missing a bunch of declarations in the beginning of the UDT. Also it would be helpful if you posted the error messages you received.
One potential source for the error is where you assign the $banner_template variable. You should make this assignment with single quotes and not double-quotes. This will prevent the interpreter from thinking that references like {$banner.image} are meant to be substituted immediately. So change your variable assignment to something like this:
Code: Select all
$banner_template = '
{strip}
{if isset($banner.clickthrough)}
<a rel="nofollow" href="{$banner.clickthrough}"
...
...
';
There may be other problems, but as I said earlier it is hard to know until you post your entire UDT and/or the error messages.
Hope this helps.
-S