We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2611
    • 394 Posts
    This is perfectly legal right? huh

    Snippet:
    return $modx->getChunk('proof', array(
       'value' => array(
          'value' => 'Red',
          'id' => 3
       ),
       'option' => array(
          'value' => 'Red',
          'id' => 3
       )
    ));


    Chunk: ’proof’
    Value: [[+value.value]]<br />
    ID: [[+value.id]]<br />
    Option value: [[+option.value]]<br />
    Option ID: [[+option.id]]


    When I output the chunk, ALL values are empty. If I change the snippet to:
    return $modx->getChunk('proof', array(
       'aKeyNotNamedValue' => array(
          'aKeyNotNamedValue' => 'Red',
          'id' => 3
       ),
       'option' => array(
          'aKeyNotNamedValue' => 'Red',
          'id' => 3
       )
    ));


    Everything magically starts to work...what’s wrong with using "value" as a key?

    [edit]Using 207 btw[/edit]
      Follow me on twitter: @b03tz
      Follow SCHERP Ontwikkeling on twitter: @scherpontwikkel
      CodeMaster