Extenders » Summary

This extender's file is named: summary.extender.inc.php

Purpose

The "Summary" extender provides legacy support for the Ditto v1.x era [+summary+] placeholder and it's associated parameters.

NewsListing was originally designed with the thought that it would be used to display lists of blog entries, news articles, etc. where for each item you'd want to show it's title, author, date and the first fifty or so characters of the article as a "summary" thereof: hence the [+summary+] placeholder. As for version 2, Ditto will no-longer support the summary placeholder natively as it is resource intensive and superseded (introtext field)

Placeholders

This extender defines two placeholders:

[+summary+] will contain the first "n"characters of the corresponding MODx document's content field.

[+link+] will contain an HTML link to the corresponding MODx document (so that you can view the entired document that has been summarized in Ditto's output list.

This extender also defines parameters that deal with two basic issues: the rules for how much of the document's content field to place in the [+summary+] placeholder, and how to format the HTML link that's placed in the[+link+] placeholder.

The truncation function has a wandering ability so if you set it to 50 characters it will wander &truncOffset (30) either way by default to find the nearest end tag or end of word.

Parameters

Parameter Description Value Type Legal Values Default Value Comments
&trunc Enable truncation of the text that goes into the [+summary+] placeholder boolean 0 = don't truncate

1 = do truncate
1  
&truncAt Location to split the content at   Any unique text or code string that is contained in the content of each document. <!-- splitter --> $_lang['splitter']
&truncLen Number of characters to show of the content   Any number greater than &truncOffset 300  
&truncOffset Number of characters to “wander” either way of truncLen   "Any number greater less than truncLen" 30  
&truncText Text to be displayed in [+link+]   Any valid text or html ”Read more...” $_lang['more_text']
&tplTrunc Template to be used for [+link+]   Any valid chunk name
Code via @CODE:
File via @FILE:
&truncText Placeholders:
[+url+] URL of the document.
[+text+] &truncText.
&truncSplit Should the document be summarized at the "splitter"? boolean 0 = don't truncate

1 = do truncate
1