diff --git a/index.php b/index.php index a9d506d..536839e 100644 --- a/index.php +++ b/index.php @@ -100,6 +100,7 @@ Router\get_action('show', function() { switch ($menu) { case 'unread': $nav = Model\get_nav_item($item); + $nb_unread_items = Model\count_items('unread'); break; case 'history': $nav = Model\get_nav_item($item, array('read')); @@ -113,6 +114,7 @@ Router\get_action('show', function() { } Response\html(Template\layout('show_item', array( + 'nb_unread_items' => isset($nb_unread_items) ? $nb_unread_items : null, 'item' => $item, 'feed' => $feed, 'item_nav' => isset($nav) ? $nav : null,