Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/docs/Choices/CaptureChoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ If you do not enable this, QuickAdd will default to `{{VALUE}}`, which will inse
You can use [format syntax](/FormatSyntax.md) here, which allows you to use dynamic values in your capture format.

If you want to insert `.base` content into your current note, keep **Capture to active file** enabled and use a `.base` template token in the capture format. See [Capture: Insert a Related Notes Base into an MOC Note](/Examples/Capture_InsertBaseTemplateIntoActiveFile.md).
If you want QuickAdd to create a brand new note that already contains an
embedded Base, use a Template choice instead. See
[Template: Create an MOC Note with a Link Dashboard](/Examples/Template_CreateMOCNoteWithLinkDashboard.md).

If your capture format includes an inline `js quickadd` block and you need to
transform user input, prefer reading input in script code through
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/Choices/TemplateChoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The template choice type is not meant to be a replacement for [Templater](https:
**Template Path**. This is a path to the template you wish to insert. Paths are vault-relative; a leading `/` is ignored.

QuickAdd supports markdown (`.md`), canvas (`.canvas`), and base (`.base`) templates. The created file uses the same extension as the template.
If you want a new markdown note to include a live embedded Base dashboard, see
[Template: Create an MOC Note with a Link Dashboard](/Examples/Template_CreateMOCNoteWithLinkDashboard.md).

## Optional
**File Name Format**. You can specify a format for the file name, which is based on the format syntax - which you can see further down this page.
Expand Down
105 changes: 105 additions & 0 deletions docs/docs/Examples/Template_CreateMOCNoteWithLinkDashboard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
title: "Template: Create an MOC Note with a Link Dashboard"
---

Use this pattern when you want QuickAdd to create a new map-of-content note
that already contains a live Base dashboard for both backlinks and outgoing
links.

## Why this pattern

A Template choice can create the note and insert the dashboard in one step.
The note stays markdown, while the embedded `.base` block gives you a live view
of how that note connects to the rest of your vault.

This works well for maps of knowledge, hub notes, topic notes, and evergreen
indexes.

## Setup

1. Create a reusable `.base` template, for example
`Templates/MOC Link Dashboard.base`:

```yaml
formulas:
note_link: "file.asLink()"
properties:
formula.note_link:
displayName: Note
file.folder:
displayName: Folder
file.mtime:
displayName: Updated
views:
- type: table
name: Backlinks
filters:
and:
- 'file.ext == "md"'
- "file.hasLink(this.file)"
- "file.path != this.file.path"
order:
- formula.note_link
- file.folder
- file.mtime
- type: table
name: Outgoing links
filters:
and:
- 'file.ext == "md"'
- "this.file.hasLink(file)"
- "file.path != this.file.path"
order:
- formula.note_link
- file.folder
- file.mtime
```

2. Create a markdown template, for example `Templates/MOC Link Dashboard.md`:

````markdown
---
tags:
- moc
---

# {{VALUE:moc_title}}

## Link Dashboard

Use the view picker in this embedded base to switch between backlinks and
outgoing links for this note.

```base
{{TEMPLATE:Templates/MOC Link Dashboard.base}}
```

## Notes

- Start linking this note to related ideas.
````

3. Create a **Template** choice with settings like these:

- **Template Path**: `Templates/MOC Link Dashboard.md`
- **File Name Format**: `{{VALUE:moc_title}}`
- **Create in folder**: your MOC folder, for example `MOCs`
- **Open**: enabled
- **File already exists behavior**: `Increment the file name`

4. Run the Template choice and enter a title such as `Alpha Project`.

## What you get

QuickAdd creates a new markdown note with an embedded Base block.
Inside the note:

- `Backlinks` shows notes that link to the new MOC.
- `Outgoing links` shows notes the MOC links to.
- Both views use `this.file`, so the dashboard automatically scopes itself to
the note that was just created.

After the note exists, add links in either direction and the dashboard updates
with the current graph around that note.

![MOC link dashboard template demo](../Images/template_moc_link_dashboard_demo.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Take a look at some examples...
- [Capture: Add Journal Entry](docs/Examples/Capture_AddJournalEntry.md)
- [Macro: Log book to daily journal](docs/Examples/Macro_LogBookToDailyJournal.md)
- [Template: Add an Inbox Item](docs/Examples/Template_AddAnInboxItem.md)
- [Template: Create an MOC note with a link dashboard](docs/Examples/Template_CreateMOCNoteWithLinkDashboard.md)
- [Macro: Move all notes with a tag to a certain folder](docs/Examples/Macro_MoveNotesWithATagToAFolder.md)
- [Template: Automatically create a new book note with notes & highlights from Readwise](docs/Examples/Template_AutomaticBookNotesFromReadwise.md)
- [Capture: Add a task to a Kanban board](docs/Examples/Capture_AddTaskToKanbanBoard.md)
Expand Down
1 change: 1 addition & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ const sidebars = {
label: "📄 Template Examples",
items: [
"Examples/Template_AddAnInboxItem",
"Examples/Template_CreateMOCNoteWithLinkDashboard",
"Examples/Template_AutomaticBookNotesFromReadwise",
],
},
Expand Down