We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28033
    • 925 Posts
    It seems that if you use something like this...

    [[snippet? &test-case=`This is a test`]]


    The - causes MODx to output a unexpected = error. I don’t know that much about PHP, but would it be possible to allow the - to be in the parameter call? It would be nice for grouping fields, such as &dairy-milk, as an example. wink
      My Snippets
      -> PopUpChunk v1.0
      • 28215
      • 4,149 Posts
      Why not $dairyMilk? or dairy_milk? Using ’-’ in variable names is a bad PHP practice, and usually bad programming practice in general. I don’t think MODx will want to encourage that, imo.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 28033
        • 925 Posts
        Quote from: splittingred at Apr 13, 2008, 09:49 PM

        Why not $dairyMilk? or dairy_milk? Using ’-’ in variable names is a bad PHP practice, and usually bad programming practice in general. I don’t think MODx will want to encourage that, imo.

        Oh, it is? I didn’t know that. tongue

        *makes a note*

        You can close the topic now, I guess.
          My Snippets
          -> PopUpChunk v1.0
          • 7231
          • 4,205 Posts
          the - is an Arithmetic Operator.
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]