function entries($params, $node) { global $FUNCS, $CTX; extract($FUNCS->get_named_vars(array('limit' => '', 'skip_custom_fields' => '0'), $params)); $limit = $FUNCS->is_non_zero_natural($limit) ? intval($limit) : 1000; //Practically unlimited. $skip_custom_fields = $skip_custom_fields == 1 ? 1 : 0; // get the entries array object supplied by days tag $entries =& $CTX->get_object('entries', 'days'); if (is_array($entries)) { $count = count($entries); $limit = $limit < $count ? $limit : $count; for ($x = 0; $x < $limit; $x++) { $entry =& $entries[$x]; $pg = new KWebpage($entry['template_id'], $entry['id'], 0, 0, $skip_custom_fields); if ($pg->error) { ob_end_clean(); die('ERROR: ' . $pg->err_msg); } $pg->set_context(); foreach ($node->children as $child) { $html .= $child->get_HTML(); } } } return $html; }