If you’re coming from Obsidian which uses ![[link]], its’ not quite as easy, but it is still possible to embed a page in another page. You can do this with a template block, with:
page: "[[]]"
You could also create a snippet template that looks like this:
---
tags: template
description: Embed a page inside another
hooks.snippet.slashCommand: embed
---
```template
page: "[[|^|]]"
` ` ` (the md here is getting broken, that should be an ending codeblock ```)
Then all you need to do is /embed and your cursor will drop to the right place and you can start typing. Note: You can’t embed portions or sections of a page, like you could in, e.g., Obsidian, with [[page#heading]].
amazing thank you!!!
how can you include the embeded page name in the template? ive tried so many different ways but no luck.
is there a site to learn these functions?
Using a page YAML body as suggested by @SONDLecT is legacy although it still works, although you should already see a warning suggesting you replace it with an Live Templates include block, and if you read the docs on that, you’ll see the suggestion to replace that with the the code I just listed
This is definitely a neater approach. I think that autocomplete isn’t…autocompleting with {{[[link/to/page]]}}, but once that bug is squashed, it will definitely be the preferred method for me.
Hello.
The template design {{[link / to / page]}} works correctly with images but does not display the graphical output of the mervaid plugin. Or I’m doing something wrong ?