Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If you want to call a partial `test-partial.html` from within a shortcode it can be done like:
- `test.md`:
- ```
- {{< incpartials >}}
- ```
- `layouts/shortcodes/incpartials.html`:
- ```
- {{ partial "test-partial.html" . }}
- ```
- To add to @Leo_Merkel’s handy example, if you want to pass the partial name as an argument:
- Usage:
- ```
- {{< incpartials "test-partial.html" >}}
- ```
- Definition:
- ```
- {{ partial (.Get 0) . }}
- ```
Add Comment
Please, Sign In to add comment