We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10647
    • 36 Posts
    shocked

    Ok, this is an extremely newb/dumbass question. But I am an extreme newb. grin

    So. how do you implement snippits?

    Do you just paste, for example:

    $modx->runSnippet(’WebLogin’); into document content? Well obviously not because it didn’t work.

    This was probably too newb of a question to put into the documentation so I coulnd’t find the answer there. THanks everyone in advance.
      • 11975
      • 2,542 Posts
      Hello,

      you should have a look to the default template.
      There are two ways to call snippets, it depends on the document settings
      if the page is cacheable => [!mySnippet !] , if not => [[mySnippet ]]

      Most of the snippets requires parameters

      [!mySnippet?param1=`value1` &param2=`value2` !]

      You also can call a snippet within another snippet

      [!mySnippet?param1=[[anotherSnippet]] &param2=`value2` !]
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 10647
        • 36 Posts
        Thank you so much. grin