Panel search src

hi,

on kirby panel source: search.vue file:

  map_pages(item) {
      return {
        id: item.id,
        title: item.title,
        link: this.$api.pages.link(item.id),
        info: item.id
      };
    },

i need to display another field from the pageā€¦ i know shouldnt touch kirby src butā€¦ how can i fetch some other field?

thanks

You can get all the current page content with this.$store.getters["content/values"] so if you did something like:

data() {
  return {
    something: this.$store.getters["content/values"]()["nameofthefieldyouwant"]
  }
},

You can get the value like that in your the Vue component.

Im afraid I do not know how to modifiy the default search component, but the above should put you on the right track. It is possible to override it with your own customised version, but im afraid I dont know how.