2015-06-04, 00:54:20
Then you can use this code in your component or template:
It's a patched version of nm_list_recent(), for News Manager 2.2.x to 3.1
(I may add some option or function for this... In the meantime you can use that.)
Code:
<?php
global $NMPAGEURL, $NMRECENTPOSTS;
if ($NMPAGEURL == '') return;
$posts = nm_get_posts();
if (!empty($posts)) {
echo '<ul class="nm_recent">',PHP_EOL;
$posts = array_slice($posts, 0, $NMRECENTPOSTS, true);
$posts = array_reverse($posts); // ascending date order
foreach ($posts as $post) {
$url = nm_get_url('post') . $post->slug;
$title = stripslashes($post->title);
echo ' <li><a href="',$url,'">',$title,'</a></li>',PHP_EOL;
}
echo '</ul>',PHP_EOL;
}
?>
It's a patched version of nm_list_recent(), for News Manager 2.2.x to 3.1
(I may add some option or function for this... In the meantime you can use that.)