Website ๐ contributte.org | Contact ๐จ๐ปโ๐ป f3l1x.io | Twitter ๐ฆ @contributte
This project is no longer being maintained. Please use contributte/latte. |
---|
Composer | contributte/latte |
---|---|
Version | |
PHP | |
License |
State | Version | Branch | Nette | PHP | |
---|---|---|---|---|---|
dev | ^3.1 |
master |
3.0+ | ^7.2 |
|
stable | ^3.0 |
master |
3.0+ | ^7.2 |
|
stable | ^2.0 |
master |
2.4 | >=5.6 |
|
stable | ^1.2 |
master |
2.4 | >=5.4 |
(old namespace) |
Register filter (in case you use nette/di)
services:
nette.latteFactory:
setup:
- addFilter('email', 'Contributte\Latte\Helpers\EmailHelper::mailto')
# or
- addFilter('email', ['Contributte\Latte\Helpers\EmailHelper', 'mailto'])
Alternatively you can also add filter directly to template
use Contributte\Latte\Email\Helpers\EmailHelper;
public function createTemplate()
{
$template = parent::createTemplate();
$template->addFilter('email', [EmailHelper::class, 'mailto']);
}
{var $mail = "my@email.net"}
{$mail|email:"javascript"}
{$mail|email:"javascript_charcode"}
{$mail|email:"hex"|noescape}
{$mail|email:"javascript":"link to my email here"}
{$mail|email:"drupal"}
{$mail|email:"texy"}
- javascript
- javascript_charcode
- hex
- drupal
- texy
This package was maintain by these authors.
Consider to support contributte development team. Also thank you for being used this package.