For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > July 2004 > inserting an obfuscated mailto link into a componentised layout









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 inserting an obfuscated mailto link into a componentised layout
Thorsten

2004-07-21, 9:00 am

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?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com