We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18330
    • 20 Posts
    hi all.
    I’ve created a snippet that read an extern rss and show into the site but i have problem with the parameter for take the url.
    when the call to the snippet is this for example: [!lastRSS? &rssurl=`http://www.someurl.com/xml.php?n=20&region=1\&industry=3\&category=10`!]
    the modx leave out this part of the parameter: ?n=20&region=1\&industry=3\&category=10
    Can anyone tell me if i can set an escape character and the snippet take the complete parameter?
    I’ve proved \ and not works
    Sorry by my english, i am argentinian.
    I’ll need that the snippet take the parameter as like the example.
    Thanks

    Mario
      • 22303 MODX Staff
      • 10,725 Posts
      In the current releases of MODx 0.9.6.x, the parser will not allow the characters ?, &, or = to appear in Snippet tags, similar to how URLs do not allow them. Many components have chosen to use a sequence of characters to represent these and simply replace them in the snippet code with the appropriate values, i.e. [[Snippet? &url=`http://foobar/index.php|qm|param|eq|value|amp|param2|eq|value2`]] with ? represented by |qm|, = by |eq| and & by |amp|.
        • 18330
        • 20 Posts
        Thanks, this works fine. i have an idea for leave this snippet for the all people but i think i’ll need a way to specify the url and add a few attributes, maybe with the @EVAL i’ll can do. I’m not good with php but i have an idea.
        The snippet works fine now, but is too poor sad
        If anyone have an idea of how i can modify this or tell me a good way that would be great.
        Is my first snippet and i’ll like make all the code wink
        Thanks again
        Best

        Mario
          • 3749
          • 24,544 Posts
          Quote from: maritin at Mar 04, 2009, 05:13 PM

          Thanks, this works fine. i have an idea for leave this snippet for the all people but i think i’ll need a way to specify the url and add a few attributes, maybe with the @EVAL i’ll can do. I’m not good with php but i have an idea.
          The snippet works fine now, but is too poor sad
          If anyone have an idea of how i can modify this or tell me a good way that would be great.
          Is my first snippet and i’ll like make all the code wink
          Thanks again
          Best

          Mario

          The usual thing is to put a message here:

          http://modxcms.com/forums/index.php/board,179.0.html

          In your message, describe clearly what your snippet does, attach a .zip file with the code (or paste it in the message if it’s short), and ask for feedback.

          Welcome to MODx . . . smiley
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 18330
            • 20 Posts
            Ok, i’ll work a few time more on this snippet and then add to that url wink
            Is a nice CMS modx, or CMF smiley
            Thanks

            Mario