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

    I try to switch from ditto chunks to ditto config files which works rather well, But I have a problem with the extenders. As soon as I add th extenders to the config file I get a parse error.

    this is the extender I try to use.
    $extenders = 'summary,dateFilter';

    as soon as I move the extenders back into the call it works. Any Idea what I’m doing wrong?

    This config files make life a lot easier.

    Thanks a lot.
      • 36416
      • 589 Posts
      Quote from: bbeer at May 13, 2009, 02:19 AM

      I try to switch from ditto chunks to ditto config files which works rather well, But I have a problem with the extenders. As soon as I add th extenders to the config file I get a parse error.

      $extenders[] = "dateFilter";
      $extenders[] = "tagging";
      etc...
      


      Quote from: bbeer
      This config files make life a lot easier.

      Indeed!
        • 4172
        • 5,888 Posts
        not sure but maybe you need an array:
        $extenders = array('summary','dateFilter');


        [Edit] eol was faster smiley
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 2901
          • 277 Posts
          Eol and Bruno

          thanks a lot
            • 16278
            • 928 Posts
            Does the same apply to &orderBy in a config file? I got parse errors the last time I included that parameter, so I put it back into the Ditto call rather than step backwards into using &sortBy, which works in a config file. I think I tried to make an array of the field and direction, and failed, but perhaps I got something wrong. undecided
            KP
              • 2901
              • 277 Posts
              well I would guess this must be the same with @orderBy
                • 16278
                • 928 Posts
                :( No such luck But then, looking further into config files, I found a way - just copy what the Ditto snippet code (the stuff in Manage Resoruces, that is) does when presented with OrderBy:
                $orderBy = array('parsed'=>array(),'custom'=>array(),'unparsed'=>$orderBy);

                I have only a vague idea what all those arrays are about, something to do with Ditto handling of custom sorts and filters, but I’m not sure I want to spend a week unpicking the code. undecided Main thing is, it works, and should work reliably!
                KP
                  • 2901
                  • 277 Posts
                  just reread your post

                  $orderBy = 'your TV or what ever';


                  and not
                  &orderBy=``


                  that should do the trick.