Skip to content

Feature Request: Command for getting page title via the block uid #119

@MarketHubb

Description

@MarketHubb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions