Finder API¶
findTemplateInViews¶
Find a template file by name in the provided views directories.
Parameters¶
| Parameter | Type | Description |
|-----------|------|-------------|
| templateName | string | Template name to search for (with or without extension) |
| viewsDirs | string[] | Array of views directories to search |
Returns¶
string | null — Absolute path to the template file, or null if not found.
Behavior¶
-
Searches recursively through subdirectories for bare template names (no
/in name). -
Tries
.htmland.mikiextensions when no extension is provided. -
Also searches app-style
templates/directories nested inside the views root. -
Returns the first match found.
setAppTemplateDirNames¶
Configure which directory names are treated as app-style template directories.
Parameters¶
| Parameter | Type | Description |
|-----------|------|-------------|
| names | string \| string[] | Directory name(s) to recognize |
getAppTemplateDirNames¶
Get the current app template directory names.