Update tasks from query, but without rendering the ref

I notice when rendering task objects from a query, you can toggle the task in the query view and the actual object will update as well, including in the page it’s defined in.

This is awesome! But it seems you lose this functionality if you don’t render the ref in the task; you can still toggle the task in the query view, but it’s data isnt actually updated anywhere else, and if you reload the query it will have reverted to its previous state.

For instance, this is the Library/Core/Query/Task template, which supports toggling in queries:
* [{{state}}] [[{{ref}}]] {{name}}

But I have long page names, and it makes it difficult to read my tasks when they’re all prefixed with a big blue link like “Logbook: February 2025:@3600”, so I’d really like to render tasks like * [{{state}}] {{name}}

Is there a way to achieve this with space scripts?

If you don’t mind the entire text being a link, you can use the link renaming feature like this: * [{{state}}] [[{{ref}}|{{name}}]]

Or if you prefer to hide the link almost entirely you can do * [{{state}}] [[{{ref}}| ]]{{name}}, which replaces the link with just a single space character. You get the idea, you can replace the link text with almost anything.

You can also change the order so this works just as well: * [{{state}}] {{name}} ([[{{ref}}|link]])