Closed jesuismaxime closed 5 years ago
Is there a way to achieve a structured color theme using the query option ?
Even try to use a collection to convert my data to a valid YAML but doesnt work
// $kirby->collection("settings/palettes"); return function ($site) { $return = []; $palettes = $site ->find('configuration') ->children() ->find('settings') ->site_palettes() ->toStructure(); foreach( $palettes as $palette ): $return[$palette->handle()->value()]['background_color'] = $palette->background_color()->value(); $return[$palette->handle()->value()]['text_color'] = $palette->text_color()->value(); endforeach; return YAML::encode($return); };
Unfortunately I don't think there's a way for now, Kirby automatically discards non-scalar values. I'll open an idea ticket.
Is there a way to achieve a structured color theme using the query option ?
Even try to use a collection to convert my data to a valid YAML but doesnt work