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

    I’m trying to use removeChunk as a parameter in my ditto call as I dont want to list the Jot comments on my page.

    My parent page ditto call is:

    [!Ditto? &startID=`[*id*]` &display=`10` &tpl=`FSMDittoSummary` &paginate=`1` &alwaysshow=`1` &sortBy=`menuindex` &dateFormat=`%b %Y` &removeChunk=`MovieComments`!]
    


    I’m calling my page uncached via a chunk as I have a few pages doing the same thing. The chunk still remains in the body and displays as the snippet call (not the actual JOT output).

    Have I got it setup incorrectly? Any help would be greatly appreciated.

    Thanks,

    ditto debug attached (rename to RAR if you have trouble with it)

    Running on:

    Apache 2
    W2k Server
    Php 4.4.4
    Modx 0.9.6
      BBloke
      • 2912
      • 315 Posts
      After doing some testing. I’ve found that it does remove a chunk if its in the introtext field and that is the one being used by the template.

      It doesn’t remove the chunk if the template is displaying the [+content+] field and the chunk name is in there.
        BBloke
        • 2912
        • 315 Posts
        A little more info.

        The chunk I wish to remove contains a Jot call. I’ve added a temporary chunk which contains the IMG html tag and that does remove.

        It looks as though the chunk containing the snippet is being replaced prior to chunk getting removed!!! :’(

        I was hoping the chunk would be removed so I could have a better listing on the screen.

        Help or comments would be appreciated.
          BBloke
          • 18397
          • 3,250 Posts
          As an experiment, try switching the Ditto call itself from uncached to cached.
            • 2912
            • 315 Posts
            Ok. At the moment the page is uncahced and the call is [! and its not removing the chunk.

            First Test: Page uncached snippet called as [[
            Result: The page list given is from the root level going 1 tier deep.

            Second Test: Page cached snippet called as [[
            Result: Same as above. List from root 1 level deep.

            I’ve also tried changing the StartID from [*id*] to [~id~] and [+id+]. I’ve also tried changing the call to a specific document ie 60.

            This has resulted in giving the listed page as was but the [!Jot call within the chunk now fills as it should rather than it showing the actual Jot call as text. The downside is that its not removed the chunk.

            I have something to workaround it in place so I’ll leave it there. I do think its a mechanic of the system where it doesn’t see the chunk but the snippet call contained with the chunk.

            If you have any more ideas I’d be willing to try.

            Thanks for you help.

              BBloke
              • 18397
              • 3,250 Posts
              Please provide the debug output of the call by completing the following steps:
              * Append &debug=`1` to the call
              * Click "Save Debug Console"
              * Rename the extension to .txt
              * Attach to your post
                • 2912
                • 315 Posts
                Thanks again Mark,

                Here’s an updated debug. I posted it in the original message.

                  BBloke