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
{{ message }}
This repository was archived by the owner on Nov 14, 2023. It is now read-only.
See the `@snippets` and `@templates` parts in our extends and includes? These are Twig namespaces, i.e. aliases for specific directories. Out of the box we have 4 namespaces:
109
+
110
+
-`@templates`
111
+
-`@snippets`
112
+
-`@plugins`
113
+
-`@assets`
114
+
115
+
They all point to the corresponding directory (generally `site/snippets`, `site/plugins` etc.), and follow Kirby’s configuration if you have changed those paths.
116
+
117
+
Finally, note that you can use the `source()` function to output the contents of a file that is not a template, for instance if you want to inline a short script in a page:
118
+
119
+
```twig
120
+
<script>
121
+
{{ source('@assets/js/some-script.min.js') }}
122
+
</script>
123
+
```
124
+
125
+
76
126
Kirby-specific variables and functions
77
127
--------------------------------------
78
128
@@ -120,8 +170,8 @@ The few exceptions are:
120
170
121
171
### Getting config values
122
172
123
-
- Use the `c(configName, defaultValue)` function in Twig templates to get config values (shortcut for `c::get`).
124
-
- Use the `l(configName, defaultValue)` funciton in Twig templates to get language-specific config values or translation strings (shortcut for `l::get`).
173
+
- Use the `c__get(configName, defaultValue)` function in Twig templates to get config values (shortcut for `c::get`).
174
+
- Use the `l__get(configName, defaultValue)` funciton in Twig templates to get language-specific config values or translation strings (shortcut for `l::get`).
0 commit comments