benjypng / logseq-powerblocks-plugin

logseq-powerblocks-plugin
MIT License
10 stars 0 forks source link

[Feature Request]: Add syntax to query properties #2

Closed kings2u closed 1 year ago

kings2u commented 1 year ago

Plugin Version

0.0.32

Logseq Version

current as of today

Request

Thank you for this genius plugin, it’s just what I’ve been looking for.

I would love a syntax that allows us to query the values of a page's properties. The default could be the properties of the current page, but could be expanded to allow a user to also specify another page's properties to query.

Make my dreams come true?

benjypng commented 1 year ago

I roughly understand the feature request but could you provide a specific example to be sure?

Get Outlook for iOShttps://aka.ms/o0ukef


From: kings2u @.> Sent: Wednesday, April 5, 2023 9:55:16 AM To: hkgnp/logseq-powerblocks-plugin @.> Cc: Subscribed @.***> Subject: [hkgnp/logseq-powerblocks-plugin] [Feature Request]: Add syntax to query properties (Issue #2)

Plugin Version

0.0.32

Logseq Version

current as of today

What browsers are you seeing the problem on?

Windows

What happened?

Thank you for this genius plugin, it’s just what I’ve been looking for.

I would love a syntax that allows us to query the values of a page's properties. The default could be the properties of the current page, but could be expanded to allow a user to also specify another page's properties to query.

Make my dreams come true?

— Reply to this email directly, view it on GitHubhttps://github.com/hkgnp/logseq-powerblocks-plugin/issues/2, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALNXKGI4EVW2EDHH53JJ5JDW7TGIJANCNFSM6AAAAAAWTOPCRQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

kings2u commented 1 year ago

Sure! So let's say we have a [[page 1]] with a page property of DOB:: 1/1/2000. I’d love for a template to insert the DOB as needed.

So, for example, the syntax could look like: I was born on <%PROPERTY: [[page 1]] DOB%>. And it would resolve to I was born on 1/1/2000. So the reference would require the page name and a specific property of the page.

I think you already have the start of this functionality with the syntax <$CURRENTPAGENAME%>, but being able to reference a page's properties would allow the creation of very sophisticated templates for things like emails, letters, and other repetitive information.

Thanks again for considering this feature!

benjypng commented 1 year ago

This is available in the latest update. For your example, separate your page with a comma, e.g. I was born on <%GETPROPERTY:[[page 1]],DOB%>.