Re: [SMARTY] Smarty replace question
Jochem Maas <[email protected]> Wed, 27 Dec 2006 17:02:35 +0100
| Newsgroups | gmane.comp.php.smarty.general |
|---|---|
| Message-ID | <[email protected]> |
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:
>
>> James Turner wrote:
>>> I was wondering if it is possible to call {mailto} within a replace.
>>
>> 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
>>
>
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php