Template with multiple blocks

Hi,

I’ve been using Obsidian for a while now, but Logseq is getting more and more of my attention as the tool to use, or to use in combination with Obsidian.

In order to make things easy, I have a template to start my day which is based on multiple blocks.
However, with Logseq I can only seem to be creating a template from 1 major block, which would mean I need to put everything under 1 block, or create multiple blocks.

Therefore my question, can you create a template from multiple blocks?

No, a template is one block (It can still hold multiple paragraphs/headers, so it will turn in multiple logseq blocks). For most uses that is enough, adding multiple blogs would greatly increase the complexity of the templating engine, and logseq is still too new for that.

If you need something more you can use something like text-expander on the Mac, or espanso, which I use on Mac/Win/Linux.

That is even easier then using a template, imho. You could even use some scripting language to pull data from other places to fill out your template.

1 Like

I thought you could specify on a template whether or not to include the parent node or just copy the child nodes. If you select the latter then that should be the equivalent of a multi block template.

2 Likes

4 years later, is this still the definitive answer?

I have the exact same need and would be happy to set my template as default journal template, but again, I am now using 3 different templates for the 3 different blocks I want to insert.

I found template-including-parent or including-parentbut neither of them seem to have any effect.

Correct me if I am wrong, but you can have your multi-block single-template setup through setting template-including-parent to false. It could, for example, be something like this:

Daily Journal

template:: journalprompts
template-including-parent:: false

  • First prompt

    • Prompt 1.1
    • Prompt 1.2
  • Second prompt

    • Prompt 2.1
    • Prompt 2.2
  • Third prompt

When you insert the template only the prompts and the sub-blocks should be inserted. Does this type of order not work for your setup?