To limit the results under a block of specific uuid (right-click on its bullet then Copy block ref):
- add a recursive rule like this:
:rules [ [(ancestor ?a ?b) [?b :block/parent ?a] ] [(ancestor ?a ?b) [?b :block/parent ?t] (ancestor ?a ?t) ] ]
- add
%
at the end of:in
, to indicate that:rules
are applied, so in total either::in $ ?page-name %
, if:inputs [:query-page]
is used:in $ %
, if:inputs [:query-page]
is not used (i.e. missing)
- add
- use the rule to replace
- these lines:
[?p :block/name ?page-name] [?b :block/page ?p] [?b :block/marker]
- with these ones:
[?root :block/uuid ?uuid] [(str ?uuid) ?str] [(= ?str "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")] ; use actual uuid [?b :block/marker] (ancestor ?root ?b)
- Replace
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
with the uuid of the desired block.
- Replace
- these lines: