Phoenix.Template
Summary
| eex_engine_for_file_ext(arg1) | Returns the EEx engine for the provided String extension |
| find_all_from_root(template_root) | Returns List of template EEx template file paths |
| func_name_from_path(path, template_root) | Converts the template file path into a function name |
| path_hash(template_root) | Returns the sha hash of the list of all file names in the given path |
| precompile(file_path, root_path) | Precompiles the String file_path into a |
| precompile_all_from_root(path) | Precompiles all templates witin |
| sha(data) |
Functions
Returns the EEx engine for the provided String extension
Converts the template file path into a function name
- path - The String Path to the template file
- template_root - The String Path of the template root diretory
Examples
iex> Template.func_name_from_path(
"lib/templates/admin/users/show.html.eex",
"lib/templates")
"admin/users/show.html"
Returns the sha hash of the list of all file names in the given path
Precompiles the String file_path into a render/2 function defintion, using
an engine configured for the template file extension
Precompiles all templates witin @path directory as function definitions
Injects a recompile? function to determine if the directory contents have
changed and the module requires recompilation. Uses sha hash of dir contents.
See precompile/2 for more information
Returns AST of render/2 functions and recompile?/0