Show title not URI of pages field in column of "pagetable" plugin

On a parent page I am using the pagetable plugin from @sylvainjule.

I would like to get the value of its children’s pages field. Currently I can get the URI, but I would prefer to get the Title of the page selected in the pages field.

On the parent page I have this:


    headline: Artworks
    type: pagetable
    templates: artwork
        label: Artist
        text: '{{ page.artist}}'

On the child pages I have:

  type: pages
  query: site.children.filterBy('intendedTemplate', 'database').children.template('artists').children.template('artist')

Is this possible at all?

text: '{{ page.artist.toPage.title}}'

Thanks @texnixe. And if there are multiple pages selected in the field, is there a way to utilise toPages ?

No, that wouldn’t make sense, because you would need a loop. If you really want to output multiple title, then use a custom page method or page model method to output the desired content and use that method in your query.