Parameters in User Defined Tags?
Posted: Fri Nov 18, 2005 1:23 am
Hi all,
Just wondering if there is a way to have parameters within user defined tags. I have had a good look around but can't find any information on creating tags.
I basically want to pass in a string to the tag, and for the tag to then spit out a with the string inside.
e.g.{ image_link("hedgehog") } would go to something likeĀ
I have the PHP ready, I just need to get it into a tag. Or will I have to use a proper tag? Is there any basic info on creating tags/user defined tags?
I have tried testing the basics of this in a user defined tag but it doesn't want to work (smarty errors) : -
name: image_link($fname)
code: echo $fname;
Am I missing something obvious?
Cheers.
Just wondering if there is a way to have parameters within user defined tags. I have had a good look around but can't find any information on creating tags.
I basically want to pass in a string to the tag, and for the tag to then spit out a with the string inside.
e.g.{ image_link("hedgehog") } would go to something likeĀ
I have the PHP ready, I just need to get it into a tag. Or will I have to use a proper tag? Is there any basic info on creating tags/user defined tags?
I have tried testing the basics of this in a user defined tag but it doesn't want to work (smarty errors) : -
name: image_link($fname)
code: echo $fname;
Am I missing something obvious?
Cheers.