We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9932
    • 66 Posts
    I try to get content of page and insert it to another one.
    For example there is content on page 55:
    [!SomeSnippet!]
    

    and snippet itself:
    $output = "Hello world";
    return $output;
    


    on another page:
    <h3>The content of page 55</h3>
    [!GetField?docid=`55` &field=`content` !]
    

    And in place of expected result
    The content of page 55
    Hello world
    

    I get
    The content of page 55
    [!GetField?docid=`55` &field=`content` !]


      • 25307
      • 114 Posts
      Check out the GetField snippet, works perfect.
        • 9932
        • 66 Posts
        to robot: did you tried my example?
        Undoubtedly, GetField works perfect. But not in this case, when output of GetField contents call to snippet
          • 26435
          • 1,193 Posts
          Are either of the pages cached?

          -sD-
          Dr. Scotty Delicious, DFPA.
            Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
            All of the above... in no specific order.


            I send pointless little messages
            • 25307
            • 114 Posts
            Quote from: folibis at Oct 09, 2007, 08:23 PM

            to robot: did you tried my example?
            Undoubtedly, GetField works perfect. But not in this case, when output of GetField contents call to snippet

            Unfortunately, I did... ((shrug))

            maybe try this stuff if you haven’t..

            -> clear the cache
            -> turn "Rich text" and "Cacheable" Page Settings off
            -> use no editor to test, not TinyMCE
            -> test that GetField is working correctly by rendering some richtext/html to start debugging by individual component...
            -> do the same for ’SomeSnippet’ (as per your example)
            -> for the some SomeSnippet call, use [[SomeSnippet]] instead of [!SomeSnippet!]

            Good luck...
              • 9932
              • 66 Posts
              Thanks to  Igor, the problem was solved.
              This is the decision - DynContent
                • 7923
                • 4,213 Posts
                GetField should work just as good.. I bet that TinyMCE or some other RTE that you are using has messed up the snippet call.. (if you copy the snippet call from resource repository page, there will be <!-- --> tags in the snippet call to prevent it from parsing.


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 25307
                  • 114 Posts
                  does the DynContent snippet do anything that GetField doesn’t? I’m not sure why that exists or what is different. Little help? thanx