I want query the page whose property value is the current page title and try to display other properties in table view.
Can anyone tell me how to query a page by its property value?
I’ve made some attempts and they were all poorly done:
Can anyone tell me how to query a page by its property value?
{{query (property dummyproperty "this is a value")}}
query the page whose property value is the current page title
As far as I can see, this is possible when you simply use the name of the current page. The dynamic variable <% current page %> normally works in queries, but not when the page name contains spaces. Wrapping it in quotes does not work either. I am guessing this prevents it from being expanded.
So to be clear the following does not work:
{{query (property dummyproperty "<% current page %>")}}
{{query (property dummyproperty <% current page %>)}}
I tried to work around this by making the not-working-examples above into a template. Unfortunately, this also doesn’t work as the dynamic variable gets expanded like this [[page title]]. The brackets prevent it from working.