Open-CSP / WSSlots

This extension improves support for slots in MediaWiki.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#slotdata doesn't support keys with spaces

AdSvS opened this issue · comments

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.

Hi, I have fixed this in #23. Could you take a look?

I did and I suppose it means that the call should be like this: {{#slotdata:csp-data|{{FULLPAGENAME}} |['Parameter definitions']}}. Is that correct?

That is correct, but it will only work after #23 is merged.