We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29616
    • 3 Posts
    Hello,

    I’m new to MODx. My first impression is that I like it, BUT........
    I can’t get my snippets work undecided
    I tried 3 snippets now:


    • eForm 1.4
    • IMaxiGallery
    • GoogleMaps

    eForm:

    I added the code from eform.snippet.tpl to snippets as eForm
    I added the eForm map in the /snippets directory.
    I made the chunks.
    Finally i put this code on a page:

    [!eForm?
    &formid=`feedbackForm`
    &to=`[email protected],[email protected],[email protected]`
    &tpl=`eFeedBackForm`
    &report=`eFeedbackReport`
    &thankyou=`eFeedbackThanks`
    &mailselector=`department`
    &vericode=`1`
    &subject=`Web site feedback`
    !]

    Now it should been working?
    But I don’t see anything.
    I tried to call the chunks one by one (example: {{eFeedBackForm}}), then i see the form.
    So the chunks must be OK.
    Why does my snippet not work???

    Maxi Galley:

    Strange ’bug’.
    I can press 1 button (example: manage pictures). It works.
    When i want to press another button, it won’t work.
    I first have to save the snippet again, then I can again press 1 button.
    This looks like a bug, but no one else seems to have tis problem?

    GoogleMap

    Seems a easy snippet.
    I put the googlemap code in the snippets as googlemap.
    I call the snippet in a page: [[googlemap]]
    Again, I don’t see anything on my website.

    WHAT DO I DO WRONG?? :’(

    If the snippets work this is a perfect CMS, but it work by me.....
      • 29616
      • 3 Posts
      Just figured out the problem with MaxiGallery was that the CACHE was turned on shocked
      So that snippets works.

      The other 2 are still not working :’(
        • 25663 MODX Staff
        • 12,272 Posts
        Call the others uncached as well: [! vs [[
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 29616
          • 3 Posts
          I figured out what I did wrong:

          I had to delete <?php and ?> from the snippet

          Now they work fine laugh
            • 25663 MODX Staff
            • 12,272 Posts
            FYI, 095 will allow your snippets to have PHP code tags wrapping the actual snippet code (it’s strips them out on save and adds them back in on loading into the textarea, FYI). This helps with syntax highlighting in code editors. Glad you got it worked out. smiley
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me