You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -159,7 +160,7 @@ $filter = new Twig_SimpleFilter('rot13', function ($string) {
159
160
?>
160
161
```
161
162
162
-
Would be used like this in a pattern:
163
+
This filter would be used like this in a pattern:
163
164
164
165
```twig
165
166
{{ bar|rot13 }}
@@ -186,7 +187,7 @@ $function = new Twig_SimpleFunction('boo', function ($string) {
186
187
?>
187
188
```
188
189
189
-
Would be used like this in a pattern:
190
+
This function would be used like this in a pattern:
190
191
191
192
```twig
192
193
{{ boo("ghost says what?") }}
@@ -218,7 +219,7 @@ $test = new Twig_SimpleTest('red', function ($value) {
218
219
?>
219
220
```
220
221
221
-
Would be used like this in a pattern:
222
+
This test would be used like this in a pattern:
222
223
223
224
```twig
224
225
{% if shirt is red %}
@@ -308,7 +309,7 @@ if (!class_exists("Project_setdupe_TokenParser")) {
308
309
?>
309
310
```
310
311
311
-
Would be used like this in a pattern:
312
+
This tag would be used like this in a pattern:
312
313
313
314
```
314
315
{% setdupe name = "Ziggy" %}
@@ -323,6 +324,20 @@ To use `dump()` set `twigDebug` in `config/config.yml` to `true`.
323
324
324
325
You can modify the default date and interval formats for Twig by editing the `twigDefaultDateFormat` and `twigDefaultIntervalFormat` in `config/config.yml`. Set them to an empty string to use Twig's default formats. **Please note:** both must be set for this feature to work.
325
326
327
+
### Quickly Disable Extensions
328
+
329
+
To disable extensions that you're no longer using simply add an underscore to the beginning of a filename and then re-generate your site. For example, the enabled rot13 filter:
If you're building a plugin that will be parsing Twig files you have access to three loaders. It's recommended that you use these instead of accessing Twig directly as these loaders will work with other PatternEngines.
0 commit comments