In Deliver Theme there are some code lines, in showcase.html.twig that use an script to slide some pictures in the top of page. This script use values between quotation marks, like ‘true’ or ‘false’ (i.e, arrows: {{ theme_config.carousel_options.arrows }}).
I’ve been trying to customize the admin blueprint for theme, and I’ve already configured like this (in this case, to enable or disable arrows in slides):
In the .yaml file of theme, the value saved is: arrows: true, without quotation marks. This theme doesn’t work if the true or false values are without quotation marks. In the Chrome Inspector you can see the following:
The arrow value is showed in browser like a number. For that reason it doesn’t work.
What can I do to use toggle field and save as true or false with quotation marks??
For example, if you have in blueprint.yaml, arrows: ‘1’, in carousel of Deliver Theme, this value must be true, therefore you have to convert 1 to true.
I think this is the perfect solution for these cases.
I hope I’ve helped.
Some screenshots:
theme_blueprint.yaml html code in Chrome Inspector
Thanks for your suggestions, although I can’t get the values to transform correctly, according to your instructions.
Based on the change you suggest in the twig file (arrows: {{ site.header_options.arrows ? ‘true’ : ‘false’}},), the value is always true, even if I choose false in the theme’s blueprint file.