We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33056
    • 1 Posts
    I am still trying to figure of how to edit the numbers of characters that is set by a default "summary" &extender...

    How I understand is that the numbers of characters is controlled by parameter
    "&truncLen" and "&truncOffset", when I put them in it didn’t change...

    is there any way to edit the parameters?... Code is pasted below

    - - - -

    [[Ditto? &parents=`2` &display=`2` &removeChunk=`Comments` &tpl=`ditto_blog` &paginate=`1` &extenders=`summary,dateFilter`&truncLen=’1’ &truncOffset=’20’ &paginateAlwaysShowLinks=`1` &tagData=`documentTags`]] Showing [+start+] - [+stop+] of [+total+] Articles

    [+previous+] [+pages+] [+next+]

    [[Reflect? &config=`wordpress` &dittoSnippetParameters=`parents:2` &id=`wp` &getDocuments=
      • 15082
      • 195 Posts
      Quote from: yapster at Nov 28, 2009, 09:02 PM

      [[Ditto? &parents=`2` &display=`2` &removeChunk=`Comments` &tpl=`ditto_blog` &paginate=`1` &extenders=`summary,dateFilter`&truncLen=’1’ &truncOffset=’20’ &paginateAlwaysShowLinks=`1` &tagData=`documentTags`]] Showing [+start+] - [+stop+] of [+total+] Articles

      Don’t use apostrophes in snippet calls - these (marked red in the quote) have to be backticks (`).

      Good documentation of Ditto and the summary extender at http://www.pogwatch.com/ditto/ditto-extenders/ditto-summary.html

      Greetz
      JUSI
        • 16278
        • 928 Posts
        Apart from the apostrophe error, have you maybe got &trunc (one or zero to enable/disable truncation) and &truncLen (number of characters before truncating) mixed up? &truncLen=`1` doesn’t look very realistic, somehow.
        shocked KP
          • 19889
          • 616 Posts
          &truncLen in the call seems to be fully ignored by the call = if I edit the number in the extender file, it works - any idea what the reason could be?

          thanks
            • 16278
            • 928 Posts
            &truncLen works fine for me (using Ditto as installed with MODx 1.0.0). A manual split or any text in the introtext field will have a higher precedence than the &truncLen setting, but I can’t see how that would reflect your experience with changing the extender code. huh
            What does your Ditto call look like, and where have you edited the extender file?
            smiley KP
              • 19889
              • 616 Posts
              I use these parameters:
              // set locale	
              	setlocale(LC_TIME, 'de_DE.UTF8', 'de.UTF8', 'de_DE.UTF-8', 'de.UTF-8');
              	
              	// parameters
              	$id				= 'dtHeadlines';
              	$parents 		= 175;
              	$limit			= 2;
              	$paginate		= 0;
              	$dateFormat 	= '%d. %B %Y'; // '%d. %B %Y, %H:%M:%S'
              	$hideFolders	= 1;
              	$extenders		= array('summary', 'dateFilter');
              	//$language 		= 'german';	
              	$truncLen		= 125;
              	$filter 		='id,152,2';
              	
              	// templates
              	// item
              	$tpl			= '@CODE:
              		<li class="news-item">
              			<a class="news-title ellipsis" href="[~[+id+]~]" title="[+title+]">[+title+]</a><br />
              			<p><span class="news-date">[+date+]</span> - [+summary:notags+]</p>
              		</li>';