From f914c40330dfe773e613c0d812478117047174b5 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sun, 7 Jul 2024 12:11:27 +0200 Subject: [PATCH] Updated Linked Tasks template --- website/Library/Core/Widget/Linked Tasks.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/website/Library/Core/Widget/Linked Tasks.md b/website/Library/Core/Widget/Linked Tasks.md index 25f28627..e10addde 100644 --- a/website/Library/Core/Widget/Linked Tasks.md +++ b/website/Library/Core/Widget/Linked Tasks.md @@ -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]] -``` \ No newline at end of file +{{#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}}