Panel Page Field + Languages

I’m having trouble using panel page field with multi languages, it seems that panel cannot find translated link URL-Key. Any suggestions?

EN:

IT: product page with URL-Key set to prodotti

The search function only searches in URI and title…, not in other fields.

/panel/app/src/panel/search.php, #44ff

    if(empty($pages)) {
      $pages = array();
      foreach(panel()->site()->index() as $page) {
        $pages[] = array(
          'title' => (string)$page->title(),
          'uri'   => (string)$page->id(),
        );
      }
      $this->cache->set('pages', $pages);
    }

You could, of course, modify this… But would have to keep that in mind when updating in the future.

Hi @texnixe so basically I can’t use page field :sweat:… how do you normally insert internal CTA’s on multi-language projects?

Oh, sorry, I thought you meant search, not the page field, but it is basically the same. What you could do is create a custom page field…

Edit: How about using a quickselect field and the title as text option instead?

Thank you @texnixe I’ve solved using:

pageLink:
  label:
    en: Link
    it: Link
  type: quickselect
  options: query
  query:
    fetch: pages
    value: '{{uri}}'
    text: '{{title}}'

Sadly this is temporally solution, because the page field should work by default since the multi-language its part of Kirby’s features.

Update:
I moved this topic to issues category.

Is there a solution for this in Kirby 3?

You don’t need this for Kirby 3, simply use the the pages field?