We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16681
    • 62 Posts
    This is an auto-generated topic for SIMPLX_RPC 0.5.1-RC1 by larscwallin.

    Brief Description:

    [p class="justifyleft] <p class="justifyleft]<p class="justifyleft]SNIPPET MATCHING

    New Snippet Matching style,

    http://www.myurl.com/?id=1&simplxrpc={"id":"1","method":"mySnippetName","params":{"myparam1":"hello","myparam2":"modx!"}}

    Old non matching style,

    http://www.myurl.com/?id=1&simplxrpc={"id":"1","method":"modx.runsnippet","params":{"snippetname":"mySnippetName","myparam1":"hello", "myparam2":"modx!"}"}

    With the new matching you gain cleaner procedure calls which are not bound to the Modx API and there for easier to port to new potential service backends.

    To turn matching on, simply:

    • Set the default property "simplx_rpc_use_snippet_matching" to "Yes" (default is "Yes") in the property set.
    • Or force matching by setting the "usesnippetmatching" querystring parameter to 1
      Keep it SIMPLX
      • 16681
      • 62 Posts
      Hi everyone smiley
      Hope you like this new version. I think its pretty sweet myself wink

      Additional install info
      I realized that i missed some post-install instructions.
      To get the Snippet working, please create one page which uses the SIMPLX RPC template. This is the page which will act as a access point for all RPC calls. Remember to set appropriate access permissions for this page.

      To get the examples up and running simply create another page using the SIMPLX RPC EXAMPLE template.

      The Console
      Tbhe console on the example page is really cool laugh
      It lets you make test calls to your site and try out templating etc.

      To begin with the "Query Config" tab, and the json config object, contains a param called "dummyResponse". As long as this param has a value other than "", no remote call will be made. This is to make testing easy.


      Thanks for now and let me know what you think smiley

        Keep it SIMPLX
        • 16681
        • 62 Posts
        Another thing...

        The SIMPLX RPC EXAMPLE Snippet is a nice example of how to get the getResources Snippet to return json, which in turn can be decoded to an Array. Very handy.
          Keep it SIMPLX