Hi, folks.
There's an example in the template.xml file for setting complex variables:
<!-- Recommended way of defining complex variables -->
<variable name="theme_settings">
<toggle_node_info_page>0</toggle_node_info_page>
<toggle_node_info_example>0</toggle_node_info_example>
<toggle_node_info_blog>1</toggle_node_info_blog>
<toggle_favicon>0</toggle_favicon>
</variable>
Is there a similar way to set complex variables in yaml? What I've tried hasn't worked so far:
- tag: variable
name: theme_settings
value:
toggle_node_info_page: 0
toggle_node_info_story: 1
toggle_favicon: 0
Thanks for your help!
Comments
Comment #1
vaish commentedThis would be the correct syntax:
Some background:
Currently all the XML attributes are treated just as XML tags so following two examples would produce exactly the same PHP array:
"Value" in YAML should be used only when corresponding XML action has a string as a value. For example:
or
Above two examples would be translated to YAML in the following way:
I hope this helps.
Vaish
Comment #2
michaek commentedLooks great. I don't know why I assumed it was necessary to put the values in another structure. Thanks!
Comment #3
vaish commented