Skip to content

Commit 16ed789

Browse files
committed
Merge pull request #18 from TxHawks/patch-4
Update template inheritance documentation
2 parents 2c338ee + 09ca50b commit 16ed789

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ Would be used like this in a pattern:
7878

7979
The requirements for using template inheritance with Pattern Lab:
8080

81-
* Files must go in `source/_layouts`
81+
* Files can optionally go in `source/_layouts` in order to hide them from the list of patterns.
8282
* Files must have the extension `.twig`
83-
* The filename will be used as the reference in the `extends` tag
83+
* Files can be extended either by using Pattern Lab's normal shorthand syntax (e.g, `{% extends 'templates-extended-layout'%}`),
84+
or, if they are in the `source/_layouts` directory, by using just the filename as reference (e.g., `{% extends 'extended-layout'%}`).
8485

8586
An example of a simple layout called `base.twig` in `source/_layouts`:
8687

0 commit comments

Comments
 (0)