inserting an obfuscated mailto link into a componentised layout
| From: | Thorsten | Date: | Wed, 21 Jul 2004 09:55:06 +0000 |
| Subject: | inserting an obfuscated mailto link into a componentised layout | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-11618@lists.php.net to get a copy of this message | ||
hi,
i'd like to insert the handy obfuscated mailto link into my contact page, but i'm running into an obstacle:
my template files all look like this (without the ===):
=======================================
{include file="header.tpl"}
{include file="logo_navi.tpl"}
{include file="imagegallery.tpl"}
{include file="content.tpl"}
{include file="footer.tpl"}
=======================================
and they all have the same variable {$content} in content.tpl where the main text goes which is filled with different text gathered from each php file (so each php file has it's own $smarty->assign('content','f00'). this works fine so far.
now, my thought was to put the {mailto} snippet into the $content variable since i cannot put it into my contact template file... {include file="content.tpl"}, maybe too generalised? everything i put into the $content variable is printed as-is, and is not processed.
i could create a custom template file for the contact section of course.. would that be the way to go, diverting from my generalised approach?
the longer i think about this problem, the more i get the sinister feeling that my whole approach might be problematic.
any comments?