Mention the ability to ignore missing includes/macros in README
This commit is contained in:
parent
bcb8222ebf
commit
cbbaee47d4
@ -129,6 +129,8 @@ The include tag allows you to import content from other templates in the namespa
|
|||||||
#include("header.html")
|
#include("header.html")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If the file name starts with a question mark, nonexistent files will be ignored.
|
||||||
|
|
||||||
#### Using the `include` tag with extra arguments
|
#### Using the `include` tag with extra arguments
|
||||||
|
|
||||||
The `include` tag can accept extra local variables as arguments. Here's an example with a `title` variable:
|
The `include` tag can accept extra local variables as arguments. Here's an example with a `title` variable:
|
||||||
@ -153,6 +155,8 @@ The macro tag is a powerful feature that allows you to define reusable template
|
|||||||
|
|
||||||
When a macro tag has a block, it sets the macro's content. When it doesn't, it inserts the contents of the macro. In the above example, a macro is defined and then inserted.
|
When a macro tag has a block, it sets the macro's content. When it doesn't, it inserts the contents of the macro. In the above example, a macro is defined and then inserted.
|
||||||
|
|
||||||
|
If the macro name starts with a question mark, nonexistent macros will be ignored.
|
||||||
|
|
||||||
#### Using the `macro` tag with extra arguments
|
#### Using the `macro` tag with extra arguments
|
||||||
|
|
||||||
Similar to the `include` tag, the `macro` tag can accept extra local variables as arguments. You can define these variables when including the macro. Here's an example:
|
Similar to the `include` tag, the `macro` tag can accept extra local variables as arguments. You can define these variables when including the macro. Here's an example:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user