We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    Yet another question for you Jason...

    While reading the phpThumb modifier for PHx thread, a thought occured to me : since the future parser will (if I remember correctly) replace PHx in lots of areas, will it also accept the same kind of modifiers ?

    It would be really cool smiley
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 22303 MODX Staff
      • 10,725 Posts
      In 0.9.7, all MODx tags will accept modifiers and parse them as defined in the class modInputFilter. Each element will then have a chance to go through additional processing according to modOutputFilter, after normal processing completes. These filter classes can be set in global system configuration settings, and overridden by context-specific configuration settings, or even set programmatically for a specific element with MODx API code. Overriding the behavior will be as simple as extending one or both of the filter classes and implementing the methods you wish to alter.

      Consider the following tag scenarios in 0.9.7:
      [[Snippet? &param=`[[AnotherSnippet? &param=`[[*alias:ucase]]`]]` &param2=`[[~[[++site_start]]]]:xhtml`]]

      [[[[+snippet_prefix]]Snippet? &param=`[[$ChunkThatHoldsParamValue:lcase]]`]]


      I haven’t done any work with the conditional features of phX yet, but I will try and post some additional information on how/if the functionality of conditional modifiers will change with the new core.
        • 6726
        • 7,075 Posts
        Great, just what I have been dreaming of !

        This will really extend the syntax to a new level grin
        Thanks for yet another quick answer !
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 4195
          • 398 Posts
          Late response but i finished the "default" filters a while ago and they are pretty much identical to PHx. Including the possibility to use a snippet as code for a custom modifier (without altering the filters directly). One small change is how these snippets should look to be used as a modifier.
            Armand Pondman
            MODx Coding Team
            :: Jot :: PHx