Skip to content

Instantly share code, notes, and snippets.

@jonmifsud
jonmifsud / custom-ds
Last active August 29, 2015 14:13 — forked from cmnstmntmn/custom-ds
<?php
require_once TOOLKIT . '/class.datasource.php';
class datasourcerecent_comments extends SectionDatasource
{
public $dsParamROOTELEMENT = 'recent-comments';
public $dsParamORDER = 'desc';
public $dsParamPAGINATERESULTS = 'no';
public $dsParamLIMIT = '20';
<data>
<navigation>
<section id="1" handle="pages">Pages</section>
<entry id="1">
<title mode="formatted" word-count="1">Home</title>
<url-handle mode="formatted" handle="home" word-count="1">home</url-handle>
</entry>
<entry id="2">
<title mode="formatted" word-count="2">Sample Page</title>
<url-handle mode="formatted" handle="sample-page" word-count="1">sample-page</url-handle>