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

    I am trying to write a ditto extender that replaces a custom placeholder by content that has other tv placeholders in it, but it seems the new placeholders are getting stripped from the output. Please can someone tell me how to ensure that the new content I have created is also parsed? I have an instance of the ditto object, but I’m not sure what method to call to parse the placeholders.

    Something like...
    $placeholders['myPH'] = array( array('...'), 'customPH' );
    
    $GLOBALS['ditto_object'] = $ditto;
    if (!function_exists( 'customPH' ) )
    {
      function customPH( $resource )
      {
        global  $ditto_object;
        $output = ' ... [+otherTV+] ... [+anotherTV+] ... ';
        return $ditto_object->????what goes here to parse this output????( $output );
      }
    }
    


    Thank you.
      YAMS: Yet Another Multilingual Solution for MODx
      YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
      Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
      • 22851
      • 805 Posts
      I managed to work around this problem by parsing the updated template content myself rather than running it through the ditto parser.
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.