Updated Linked Tasks template

pull/925/head
Zef Hemel 2024-07-07 12:11:27 +02:00
parent d6d06abe64
commit f914c40330
1 changed files with 10 additions and 4 deletions

View File

@ -2,8 +2,14 @@
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.
# Disabled by default for now
# hooks.top.where: 'true'
---
```query
task where name =~ /\[\[{{escapeRegexp(@page.name)}}\]\]/ where done = false render [[Library/Core/Query/Task]]
```
{{#let @linkedTasks = {task where not done and name =~ "\[\[" + escapeRegexp(@page.name) + "\]\]"} }}
{{#if @linkedTasks}}
# Linked Tasks
{{#each @linkedTasks}}
{{template([[Library/Core/Query/Task]], .)}}
{{/each}}
{{/if}}
{{/let}}