You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
MarketHubb
changed the title
Feature Request: Command for getting page title from Block UID
Feature Request: Command for getting page title via the block uid
Jul 13, 2024
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 uidThe text was updated successfully, but these errors were encountered: