Skip to content

Commit

Permalink
Added documentation for overriding EJS defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
niftylettuce committed Aug 7, 2012
1 parent f459818 commit d30964b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,20 @@ npm install email-templates-windows
5. Utilize one of the examples below for your respective email module and start sending beautiful emails!


# EJS Custom Tags

Want to use different opening and closing tags instead of the EJS's default `<%` and `%>`?.

```js
...
emailTemplates(templatesDir, { open: '{{', closed: '}}' }, function(err, template) {
...
```
# Usage
Render a template for a single email or render multiple (having only loaded the template once).
Want to use different opening and closing tags instead of the EJS's default `<%` and `%>`?. Simply add `open` and `close` properties to your `locals` object. Read the EJS documentation <a href="https://github.com/visionmedia/ejs#options" target="_blank">about tags and more options</a>.

```js
var path = require('path')
, templatesDir = path.join(__dirname, 'templates')
Expand Down

0 comments on commit d30964b

Please sign in to comment.