Adds a pair of locations to be used for loading localized templates. If a template is specified by full path and the base path is a prefix of the full path, the localized path for the correct locale will be searched for the template first.
Parameter | Type | Description |
---|---|---|
basePath | String | Path that contains templates. |
localizedPath | String | Path that contains localized resources. |
viewFolderName | String | Name of the folder inside the resources folder that contains the views. |
Example usage:
Mojo.View.addTemplateLocation("/templates/", "/templates/localized/, "views");
0 Comments