Home > Archive > PHP Smarty Templates > December 2006 > Re: [SMARTY] Smarty replace question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [SMARTY] Smarty replace question
|
|
| James Turner 2006-12-26, 10:14 pm |
| The problem is the $id variable contains more then just the username
james, it's actually the cvs $Id$ from my main php file. I assign it to
$id, and I want the username james to have the mailto. Like I said using
replace with the normla ahref tag works but using {mailto} within the
replace doesn't work. Thanks.
On Tue, 26 Dec 2006, Max Schwanekamp wrote:
> James Turner wrote:
>
> Why don't you just make a modified mailto plugin that will output the link
> the way you want it?
>
> --
> Max Schwanekamp
> NeptuneWebworks.com
> 541-517-9064
>
| |
| Jochem Maas 2006-12-27, 7:06 pm |
| James Turner wrote:
> The problem is the $id variable contains more then just the username
> james, it's actually the cvs $Id$ from my main php file. I assign it to
> $id, and I want the username james to have the mailto. Like I said
> using replace with the normla ahref tag works but using {mailto} within
> the replace doesn't work. Thanks.
which is why Max suggested writing a MODIFIED mailto plugin...
e.g:
{mailto_cvsid id=$id}
make a copy of the file containing mailto plugin, rename the file & function according to
the smarty plugin file naming convention and then hack the function to take the cvs $Id
and spit out a mailto URL (or complete A tag, or whatever)
clean, fun, easy imho.
>
> On Tue, 26 Dec 2006, Max Schwanekamp wrote:
>
>
|
|
|
|
|