Share » Forums » Setup & design » custom tag not working with a link

custom tag not working with a link

custom tag not working with a link

Thursday 16 June 2005 8:33:35 am - 1 reply

Modified on Thursday 16 June 2005 9:37:31 am by Antoine W.

Author Message

Antoine W.

Thursday 23 June 2005 12:45:52 am

Due to XML rules, < link > tag does not allow <custom> tags as children.

The solution is to use an optional attribute for the link :

<custom name='extimg' src='http://.../image.png' href='http://website/page/'>

code for design/plain/templates/content/datatype/view/ezxmltags/extimg.tpl:

{section show=is_set($href)}<a href="{$href}"{section show=is_set($target)} target="{$target}"{/section}>{/section}
<img src="{$src}" />
{section show=is_set($href)}
</a>
{/section}

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu