How can I specify the field I wanna get back from the page?

Hi
In a blueprint I try to get the fieldname “description” of a list of pages.

I tried this, but it does not work:

When I remove the underlined part then I only get the default (title) fieldname.

This is my filestructure:
image

How can I specify the field I wanna get back from the page?

Kind regards
Alain

Filtering doesn’t make sense if you want to get all description fields of the selected page sets as options, you have to use pluck('description') instead of filterBy()

1 Like

Thanks for the quick answer.

query: site.find('speisekarte').children.find('d_desserts').children.pluck('description')

Does not work either.

I did also try this without success:

Does page: page_name search in all folders, subfolders and subsubfolders,… from the root (/content)?

Found a solution:

query:
  fetch: site.find('speisekarte').find('d_desserts').children
  value: '{{page.description}}'
  text: '{{page.description}}'

:nerd_face:

I wonder if it makes sense to store the description. Why not store the page id and then get the description from the page object instead? The reason why this makes more sense is that the description is more likely to be modified later, so if the content in the field changes, your stored content will be outdated.

It’s just a test, there is no other sense behind it :slight_smile:
What is the id of the page?
I can’t see any id in the folderstructure.
Is it defined internally and accessible by $page->id()?

… I see. For example “speisekarte/d_desserts/tiramisu” is the “id”, right?