We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32963
    • 1,732 Posts
    MODx Recursive Parser (Beta 2)

    Parser Features

    • New Parser Syntax
    • Conditional Looping/Parsing
    • Nested Tag Support
    • Recursive Parsing
    • Pass Multiple Parameter Values to a snippet
    • Pass By Value - Directly pass Arrays and Objects from one snippet or TV to the next
    • New REPEAT-WHILE Tag
    • Auto Escape – Automatically escape html entities that are using inside parameter values
    • Support complex layouts using placeholders
    • New HTML form field placeholders



    Changes in Beta 2a
    ----------------------
    * fixed caching issues with broken snippets/plugins

    Changes in Beta 2
    ----------------------
    + Update documentation
    + Add Table Source support to REPEAT-WHILE. Converts an <table> into a data source
    + Fix Circular references and deadlocks
    + Add parameters to TVs. example [[*SalesReport? &type=`2`]]
    + Add HMTL form-field filters - strip|escape|raw
    + Change REPEAT-WHILE data fields from #:fields# to {#:fieldname#} to enhance visibility
    + Added new HMTL form-field placeholder tags [[+:]]
    + Remove [[:REQUEST]] tag
    + Allow nested Placeholder that are not set to return ’’
    + Renamed LOOP-WHILE to REPEAT-WHILE
    + Change &allowemptyrows to &allowEmptyRows
    + Change tplalt to altTpl
    + Add Pass by Value for TVs
    + Cache Plugins inside sitePlugins.cache.php
    + Bug Fixes


    Note: Some function where removed from the $modx object: evalSnippet(s) and Etomite db Functions by Ralph

    Please test and report any optimizations, bugs and fixes.

    A Quick Intro
    The recursive parser was designed to provide greater flexibility and to combat some of the limitations of the current MODx parser.In addition to the new features this version will automatically convert and render existing parser tags.

    For starters there are around ten parsers tags to begin with. Each tag can be individual configured as a non-cacheable tag.

    The new tag format is slightly different from the old but provides a simple and consistent format for all the tags:

    [[%LanguageTags]]
    [[*TemplateVariables]]
    [[*#TemplateVariables]]
    [[++SystemSetting]]
    [[+Placeholder]]
    [[~DocumentID]]
    [[~~DocumentID]] - Perma link
    [[$chunks]]
    [[:Condition]]

    Please see the attached document for more information.

    How to Install
    To install unzip the manager.zip to a folder and copy it’s content (including folders) inside into the root of your site. This will replace the manager/includes/document.parser.inc.php file and will add manager/includes/extenders/parser.class.php to your MODx site. Make sure to first backup your manager/includes/document.parser.inc.php before testing.




      xWisdom
      www.xwisdomhtml.com
      The fear of the Lord is the beginning of wisdom:
      MODx Co-Founder - Create and do more with less.
      • 7455
      • 2,204 Posts
      Nice work will test this soon.

      so does this now also alow tags inside tage?

      like [[$chunks[[snippet]]]] ?

      DImmy
        follow me on twitter: @dimmy01
        • 33337
        • 3,975 Posts
        WOWOW!

        man that condition tags are cooooolll!
          Zaigham R - MODX Professional | Skype | Email | Twitter

          Digging the interwebs for #MODX gems and bringing it to you. modx.link
          • 6726
          • 7,075 Posts
          Amazing Raymond !

          The concept will really bring MODx to the next step... conditionnals, my my a dream come true grin
          I’ll sure test this extensively !!!

          Hats off !

          Does this mean this will make it to the next release ?
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l&#39;outil id
            • 2762
            • 1,198 Posts
            Great workRaymond!
            You’re example of condition tags is exactly what i need! grin
              Free MODx Graphic resources and Templates www.tattoocms.it
              -----------------------------------------------------

              MODx IT  www.modx.it
              -----------------------------------------------------

              bubuna.com - Web & Multimedia Design
              • 25663 MODX Staff
              • 12,272 Posts
              I see no reason to not include this in the next release unless it just flat doesn’t work, which I doubt it’ll fail. wink

              BTW, what SVN version of the parser was this based off of?

              Thanks Raymond!
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 15987
                • 786 Posts
                Wow this looks great! I know we could have used some of these features when working on the repository. I will give this a try later this week.
                  • 32963
                  • 1,732 Posts
                  Quote from: Dimmy at Jun 20, 2006, 01:52 AM

                  Nice work will test this soon.

                  so does this now also alow tags inside tage?

                  like [[$chunks[[snippet]]]] ?

                  lololol - Yes! smiley It certainly support that format! Many thanks for bringing that one up Dimmy smiley

                  The truth is I never thought about using it like that. I’ve just tested it and it works great! This means that you can now have dynamic tags!

                  [[$SideBar[[*Lang]]? &color=`#0000ff`]]

                  You’re only limited to your imagination.
                    xWisdom
                    www.xwisdomhtml.com
                    The fear of the Lord is the beginning of wisdom:
                    MODx Co-Founder - Create and do more with less.
                    • 32963
                    • 1,732 Posts
                    Quote from: rthrash at Jun 20, 2006, 07:21 AM

                    I see no reason to not include this in the next release unless it just flat doesn’t work, which I doubt it’ll fail. wink

                    Yeah I agree it needs to be properly tested before it can be included into main core.


                    BTW, what SVN version of the parser was this based off of?

                    I’m using an old version of the parser sad I think version 0.9.. I had started working on it a long time ago but had to pause for a bit. Will be merging with the current trunk soon.
                      xWisdom
                      www.xwisdomhtml.com
                      The fear of the Lord is the beginning of wisdom:
                      MODx Co-Founder - Create and do more with less.
                      • 7455
                      • 2,204 Posts
                      And does the "regular" tags like [!snippetname!] still works? or do we need to update all snippets templates chunks etc?

                        follow me on twitter: @dimmy01