(pth, templatesPath)
| 201 | // Suggest an ID for this template based upon its path |
| 202 | // 3rd party Template Engine modules are free to use their own naming conventions but we recommend using this where possible |
| 203 | function suggestedId(pth, templatesPath) { |
| 204 | if (pth.indexOf(templatesPath) === 0) { |
| 205 | pth = pth.substring(templatesPath.length + 1); |
| 206 | } |
| 207 | var sp; |
| 208 | sp = pth.split('.'); |
| 209 | if (pth.indexOf('.') > 0) { |
| 210 | sp.pop(); |
| 211 | } |
| 212 | return sp.join('.').replace(/\//g, '-'); |
| 213 | } |
| 214 | }; |
| 215 |