This resource has been deprecated.
Outline:

Info


Latest Version:

4.4

Credits:

Mark Kaplan, Susan Ottwell, Raymond Irving, Greg Matthews and Ryan Thrash

Maintained by:

Mark Kaplan

Function:

Displays posts with full support for pagination (paging of content in increments)

Download/Support:

Forum Thread

Parameters

  • &startID - the folder containing the posts [the document called from]
  • &paginate - paginate [0]
  • &prv - chunk to be used inside the previous link ["< Previous"]
  • &nxt - chunk to be used inside the next link ["Next >"]
  • &alwaysshow - always show previous or next links (if enabled, hyperlink will be removed when prev/next page is not available, | delimiter will not be inserted) [0]
  • &prevnextsplitter - character delimiter to use to separate previous next links if alwaysshow is 0 ["|"]
  • &summarize - number of posts to list partially/fully [3]
  • &total - max number of posts to retrieve [all posts]
  • &increment - # of items to advance by each time the previous or next links are clicked [10]
  • &trunc - truncate to summary posts? if set to false, shows entire post [true]
  • &truncSplit - use the special "splitter" format to truncate for summary posts [true]
  • &truncAt - the split-point splitter itself [ <!-- splitter --> ]
  • &truncText - text for the summary "show more" link
  • &truncLen - number of characters to show in the doc summary [300]
  • &truncOffset - negative offset to use to fall back when splitting mid-open tag [30]
  • &comments - whether or not the posts have comments [false]
  • &commText - comments link text ["Read Comments"]
  • &tpl - name of the chunk to use for the summary view template
  • &dateformat - the format for the summary date (see http://php.net/strftime ) [%d-%b-%y %H:%M]
  • &datetype - the date type to display (values can be createdon, pub_date, editedon) [&sortby | "createdon"]
  • &pubOnly - only show Published posts [true]
  • &emptytext - text to use when no news items are found
  • &showarch - show archive listing? [true]
  • &archplaceholder -output archive (older posts section) as a placeholder called archive [0]
  • &archivetext - text to use for the Post Archives listing ["Older Items"]
  • &commentschunk - if you're using comments, the name of the chunk used to format them
  • &sortby - field to sort by (reccomended values include createdon, pub_date, editedon; reverts to createdon if value is invalid) ["createdon"]
  • &sortdir - direction to sort by ["desc"]
  • &debug - enables debug output [0]

Standard Call


[[NewsListing? &tpl=`NewsListingTemplate` &startID=`2` &summarize=`3` &commentschunk=`FormBlogComments`]]

Pagination Call


[!NewsListing? &tpl=`NewsListingTemplate` &startID=`2` &summarize=`2` &commentschunk=`FormBlogComments` &paginate=1]]<br /><br /> Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles<br /><div id="nl_pages">[+previous+] [+prevnextsplitter+] [+next+]</div>

Advanced Pagination Call


[!NewsListing? &tpl=`NewsListingTemplate` &startID=`2` &summarize=`3` &commentschunk=`FormBlogComments` &paginate=`1` &alwaysshow=`1`]]<br /><br />Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles<br />
< div id="nl_pages">
[+previous+] [+pages+] [+next+]
< /div>

CSS


<style type="text/css">
#nl_archivelist ul{list-style-type: none; margin-left: 15px; padding-left: 0px;}
#nl_archivelist ul ul{
list-style-type: square;
margin-left: 35px;}
.nl_month {font-weight: bold;} #nl_pages {margin-top: 10px;}
#nl_pages #nl_currentpage {border: 1px solid blue;padding: 2px; margin: 2px; background-color: rgb(90, 132, 158); color: white;}
#nl_pages .nl_off {border: 1px solid #CCCCCC; padding: 2px; margin: 2px}
#nl_pages a {border: 1px solid rgb(203, 227, 241); padding: 2px; margin: 2px; text-decoration: none; color: black;}
#nl_pages a:hover {border: 1px solid #000066; background-color: white; }
#nl_archivelist ul{list-style-type: none; margin-left: 15px; padding-left: 0px;}
#nl_archivelist ul ul{list-style-type: square;margin-left: 35px;}
.nl_month {font-weight: bold;}
</style>

Customization

Creating a new template:

To create your own templates you will need to have some knowledge of how html works.

Create a chunk based on following code and note its name. This document will assume you named it NewsListingTemplate.

Default display template (tpl):

<div class="nl_summaryPost">
<h3><a href="[~[+id+]~]">[+title+]</a></h3>
<div>[+summary+]</div>
<p>[+link+]</p>
<div style="text-align:right;">by <strong>[+author+]</strong> on [+date+]</div>
</div>

Available placeholders

  • Any document object (list) in the format of [+documentobject+]
  • Any template variable in the format of [+tvnameoftv+]
  • [+next+] - next button
  • [+previous+] - previous button
  • [+prevnextsplitter+] - splitter if always show is 0
  • [+pages+] - page list
  • [+totalpages+] - total number of pages
  • [+start+] - the # of the first item shown
  • [+stop+] - the # of the last item shown
  • [+total+] - the total # of items

Append &tpl=`NewsListingTemplate` to your snippet call and NewsListing will use your custom template


( back to top )