#slotdata doesn't support keys with spaces
AdSvS opened this issue · 3 comments
AdSvS commented
A page has a slot csp-data that has the json content model. The content of that slot is:
{
"ParameterDefinitions": [
{
"Name": "First Name",
"Formfield type": "text",
"Allowed values": "",
"Required": "",
"Multiple": "",
"Default value": ""
},
{
"Name": "Last Name",
"Formfield type": "text",
"Allowed values": "",
"Required": "",
"Multiple": "",
"Default value": ""
}
]
}
{{#slotdata:csp-data|{{FULLPAGENAME}} |ParameterDefinitions}} gives this content as the result, which is to be expected.
However when ParameterDefinitions in the slot is changed to Parameter definitions, {{#slotdata:csp-data|{{FULLPAGENAME}} |Parameter definitions}} produces nothing. From what I understand it should give the same result.
marijnvanwezel commented
Hi, I have fixed this in #23. Could you take a look?
AdSvS commented
I did and I suppose it means that the call should be like this: {{#slotdata:csp-data|{{FULLPAGENAME}} |['Parameter definitions']}}. Is that correct?
marijnvanwezel commented
That is correct, but it will only work after #23 is merged.