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

    I am trying to use ditto extenders but I might be doing something wrong.

    Here is my extender:
    <?php
    $filters["custom"]["qry"] = array("pagetitle","qry"); 
    
    if (!function_exists("qry")) {
    	function qry($resource) {
                  
    		if ($resource['pagetitle'] == "Viviendas") {
    			return 1;
    		} else {
    			return 0;
    		}
    	}
    }
    ?>
    

    Here my snippet call:
    [[Ditto? &id=`query` &parents=`8` &extenders=`qryfilter`]]

    I don’t know why it shows all the documents under the folder 8. It should only show the want with pagetitle = Viviendas.

    I am very stuck and It will be great if somebody could help.

    Thanks,

    Uri

    Admin Edit: Added code tags
      • 18397
      • 3,250 Posts
      Switch the 0 and 1 and things should work.
        • 31133
        • 22 Posts
        It’s been a long time but just wanted to say that the problem was with my ditto version.

        I upgraded to the new one and thinks works perfect.

        Regards,

        Uri