I’m trying to get the data from a theme settings selectize into a page blueprint select. So far i haven’t found anything on the topic but my PHP knowledge is quite limited and i might missed something. i tried something like
project.category:
type: select
label: Select one of the following
'@data-options': '\Grav\Themes\themename\settings::categories'
options:
'/': DATA-OPTIONS
You only specify the options-property once, I think subsequent definitions may override it. config-options@: theme.variable is valid, and assumes a variable is set in mytheme.yaml that contains a hash/dictionary (YAML), equivalent to an associated array (PHP).
However, a selectize stores a plain list/array, which does not have named keys for its values. That means that when the order of the selectize’s stored values changes, the numerical values for the select no longer match. You’d need to limit the Category-values in selectize to a known quantity, so that the options for the select matches.