Include properties in query results

Hey there

I try to query for example all my books pages or other pages with information about some objects. first, the query (simple) seem to function, but it does not really include my props set in the page or block. i like to automatically or manually include the props which i need in the table.

or do i need to do this with advanced queries (mandatory)?

any hint here?
thanks a lot
kind regards

Welcome. Please get more descriptive. Provide some example blocks or screenshots for us to understand what you currently do (your current query) and what you expect.

1 Like

Hi, ok

Here’s a block example of one of my first templates:

- [[Book]]
  template:: Book
  template-including-parent:: false
	-
	  type:: #book
	-
	  title::
	-
	  author::
	-
	  Status::
	-
	  year::
	-
	  publisher::
	-
	  link::
	-
	  comment::
	-
	  genre::
	-

I tried these two queries:

  • {{query (property :type "book")}}
  • {{query (page-property :type "book")}}

But this renders only the “block”, “page” and “type” props. Either in table view or list view, there is not the full block. Even if I choose to type the properties as childs or not. It does not function.

I’ve seen a nice example of this in the internet (but do not find it anymore… XD). What I wish is being able to choose what properties of the page / block of my “book-x-page” I want to render in my [[BooksList]] page with the query. So it is necessary that all properties of the “Book-x-page” or the child properties in the #book template which is queried are taken from the data.

Is this possible? How can I control this? Perhaps I need advanced queries for this?

Thanks for your answers.

If your block example has been pasted correctly:

  • one issue is that it breaks the properties into multiple blocks (specifically the multiple dashes - ).
  • another issue could be Template-including-parent:: false messes up Markdown file
  • use instead this markdown:
    - [[Book]]
      template:: Book
      type:: #book
      title::
      author::
      Status::
      year::
      publisher::
      link::
      comment::
      genre::
    

hey

yeah, thanks.
the problem was about using new blocks for new properties.
i tried your version and now it is functioning properly.

at least all properties are display in the table. perhaps i can sort them later.

thanks a lot.