Recent Posts
- (02/24) Calling an Element from a Helper TAGS:CakephpWeb ProgrammingUsageTutorialExample
- (10/14) Forcing A Single Join in CakePHP PaginationTAGS:CakephpCakephp 13DatabaseErrorsHabtmMysqlMssqlWeb ProgrammingUsage
- (08/11) Inserting NOW() into MySQL Using CakePHPTAGS:CakephpDatabaseMysqlMssqlWeb ProgrammingUsage
- (08/07) Best PaginateCount for CakePHP - with Group By SupportTAGS:CakephpBehaviorsWeb ProgrammingUsageDatabaseExampleMysqlHabtmHack
- (04/03) CakePHP Error Messages Not Showing on FormTAGS:CakephpCakephp 13Web ProgrammingErrorsUsage
- (02/06) Sorting Paginated Results Using a Related Model Field in CakePHPTAGS:CakephpWeb ProgrammingUsageExample
- (11/02) Changing CakePHP's Model useTable on the FlyTAGS:CakephpWeb ProgrammingMysqlDatabaseExampleTutorial
- (10/18) The Funniest Error Message Ever - Thank You EclipseTAGS:EclipseWeb ProgrammingErrorsHumorWindowsUsageSoftwarePhpCakephp
Subscribe to my feed
MainelyDesign.com Blog
Making Valid Email (mailto) links in CakePHP
Posted on 08/25/2009 at 04:59 pm by Kevin Wentworth
Viewed 2,900 times | 0 comments
It's easy to make an email address using the HTML's helper link() function. All you need to do is have an email address appended with the string 'mailto:' (just like in regular ol' HTML).
Here's my quick and dirty function to attach it if it doesn't exist:
- $address = 'mailto:'. $image['link'];
- } else {
- $address = $image['link'];
- }
- echo '<p>'. $html->link($image['link'], $address) . '</p>';
I hope this helps someone besides my forgetful brain. Cheers,
-Kevin Wentworth
Tags for Making Valid Email (mailto) links in CakePHP
Cakephp | Web Programming | Usage
Comments for this Posting
No comments. Be the first to post a reply.
Sorry, comments are closed for this posting.
Please Email Kevin if you have any questions. Thanks!
