silverbullet/website/Library/Core/Widget/Linked Tasks.md

17 lines
447 B
Markdown
Raw Normal View History

---
tags: template
description: |
Shows all tasks that contain a link the current page. For instance a task that references `[[John]]` in its name, would appear on the `John` page.
2024-07-07 18:45:17 +08:00
hooks.top:
where: 'true'
order: 1
---
2024-07-07 18:45:17 +08:00
{{#let @linkedTasks = {task where not done and contains(name, "[[" + @page.name + "]]")}}}
2024-07-07 18:11:27 +08:00
{{#if @linkedTasks}}
# Linked Tasks
{{#each @linkedTasks}}
{{template([[Library/Core/Query/Task]], .)}}
{{/each}}
{{/if}}
{{/let}}