-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Issue:
Several commands, such as <%BLOCKMENTIONS%> and <%CHILDREN%>, have parameters for choosing the output format which includes {page}. However, to my knowledge, no existing command allows you to take a block uid and return the page title it was found on.
Example:
Say I wanted to find all instances of the tag client nested under tag/attribute type in my graph.
I can use <%BLOCKMENTIONS%> to find all instances of client, then <%REPEAT%> to run a callback to query if the <%PARENT%> of the <%ITERATIONVALUE%> contains the tag type.
However, I'm left with a collection of block uids, and no way to return the page titles those block uids were found on.
Current (hacky) solution
Currently, this can be worked around by creating a Query Builder table and returning the column containing the page, but I don't believe this can be done strictly via SB commands.
Proposed solution
The getPageTitleByBlockUid function already exists in the roamjs-components package. A command that hooks into this existing function would return the page title of a given uid