getkirby-v2 / panel

This is the deprecated admin panel for Kirby v2.
http://getkirby.com
Other
134 stars 70 forks source link

Simple way to combine dynamic options in select field? #1152

Closed maximelebreton closed 6 years ago

maximelebreton commented 6 years ago

Hi all!

Is there a way to combine dynamic options in the select field? https://getkirby.com/docs/cheatsheet/panel-fields/select

I would like to combine pages and files options:

Option Description
pages List of options with all pages of the site
files List of options with all files of the page
fields:
  url:
    label: Link to page or file
    type: select 
    options: pages, files # <-- combine all pages of the site, with all files of the page

Thanks!

lukasbestle commented 6 years ago

Unfortunately not by default, the only option would be using the JSON API feature. Or building your own field of course.

Please ask questions in our forum in the future where we can help you much quicker. :)

texnixe commented 6 years ago

You can use this plugin: https://github.com/rasteiner/controlledlist