[英]Main Menu Notification if there is an article update [Joomla 2.5]?
你好,我正在使用 joomla 2.5,如果在一段時間內提交了新文章或類別內的內容,是否有任何擴展可以在主菜單上發出星號或圖像等通知? 假設今天提交了一篇文章,主菜單(產品類型:類別列表)在文章提交后大約3天的菜單旁邊會顯示諸如星級或新標簽之類的通知。
您可以覆蓋 mod_menu-template 並添加此功能:
例子:
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.='*';
}
...因此,如果最新項目來自 2014-03-27 或以后,則在標題中添加 *...
問候喬納斯
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.