-2

hello i am using joomla 2.5 , is there any extension to give notification such as star or image on main menu if there is a new article or content within category submitted for some period of time? let's just say if an article was submitted today, the main menu (Product type: category list) shows notification such as star or new label right next to the menu for about 3 days after the article was submitted.

Joan Natalie
  • 330
  • 4
  • 14

1 Answers1

1

you can override the mod_menu-template and add this functionality:

  • copy modules/mod_menu/tmpl/default_component.php to your template templates/yourtemplate/html/mod_menu/default_component.php
  • Edit default_component.php to check for new articles using your own criteria.

F.ex:

if($item->query['option']=='com_content' && $item->query['view']=='category' ){
$sql="select id from #__content where published=1 and catid="
.intval($item->query['id'])
." and created>='2014-03-27'";
$db=JFactory::getDbo();  
$db->setQuery($sql);
if(count($db->loadAssoc())) $item->title.='*';  
}

...thus, a * is added to the title if newest item is from 2014-03-27 or later...

regards Jonas

jonasfh
  • 4,151
  • 2
  • 21
  • 37