
Ok, I’ll be waiting for that.. I’ll try to do some initial snippet with the available fields for now and update it when this is done. Thanks!
@doze: No, not yet, but I plan on allowing that via a parameter.
{ "title":"test", "link":"http://localhost:8080/eclipse/modx/index.php?id=39", "description":"", "language":"english", "copyright":"My MODx Site 2006", "copyright":"My MODx Site 2006", "ttl":"120", "entries":[ { "title":"Another title", "link":"http://localhost:8080/eclipse/modx/index.php?id=42", "description":"61.438767,23.730469", "content":"
More content here
", "pubDate":"06", "guid":"http://localhost:8080/eclipse/modx/index.php?id=42", "author":"Built-in Administration account" }, { "title":"Some title", "link":"http://localhost:8080/eclipse/modx/index.php?id=41", "description":"60.239811,25.048828", "content":"
Content here
", "pubDate":"06", "guid":"http://localhost:8080/eclipse/modx/index.php?id=41", "author":"Built-in Administration account" } ] }{ "title":"test", "link":"http://localhost:8080/eclipse/modx/index.php?id=39", "description":"", "language":"english", "copyright":"My MODx Site 2006", "copyright":"My MODx Site 2006", "ttl":"120", "entries":[
{ "title":"Another title", "link":"http://localhost:8080/eclipse/modx/index.php?id=42", "description":"61.438767,23.730469", "content":"More content here", "pubDate":"06", "guid":"http://localhost:8080/eclipse/modx/index.php?id=42", "author":"Built-in Administration account" },
{ "title":"Some title", "link":"http://localhost:8080/eclipse/modx/index.php?id=41", "description":"60.239811,25.048828", "content":"Content here", "pubDate":"06", "guid":"http://localhost:8080/eclipse/modx/index.php?id=41", "author":"Built-in Administration account" } ] }$tpl = isset($tpl) ? $ditto->getTpl($tpl): $_lang['default_template'];
function getTpl($tpl){
global $modx;
$template = "";
if ($modx->getChunk($tpl) != "") {
$template = $modx->getChunk($tpl);
} else if(file_exists($tpl)) {
$template = file_get_contents($tpl);
} else {
$template = $tpl;
}
return $template;
}This discussion is closed to further replies. Keep calm and carry on.