kai*_*dra 4 joomla components backend
我想在joomla组件后端的侧边栏中设置图标JHtmlSidebar :: addEntry(JText :: _('USERS'),'index.php?option = com_users&view = users',$ vName =='users')用于创建这个侧边栏
最后我得到了这个问题的 答案
JHtmlSidebar::addEntry('<span class="dashboard-submenuicon"></span>'.
JText::_('Dashboard'),
'index.php?option=com_mycomponent&view=dashboard',
$vName == 'dashboard'
);
Run Code Online (Sandbox Code Playgroud)
我们可以写css代码
.dashboard-submenuicon{
background-image:url('your_image_url');
background-repeat: no-repeat;
display: inline-block;
height: 22px;
vertical-align: middle;
width: 22px;
margin-right:5px;
Run Code Online (Sandbox Code Playgroud)
}