dbFields = array(
'label'=>'Categories',
'hideCero'=>true
);
}
// Method called on the settings of the plugin on the admin area
public function form()
{
global $language;
$html = '
';
$html .= $this->description();
$html .= '
';
$html .= '
';
$html .= '';
$html .= '';
$html .= ''.$language->get('This title is almost always used in the sidebar of the site').'';
$html .= '
';
$html .= '
';
$html .= '';
$html .= '';
$html .= '
';
return $html;
}
// Method called on the sidebar of the website
public function siteSidebar()
{
global $language;
global $categories;
// HTML for sidebar
$html = '
';
$html .= '
'.$this->getValue('label').'
';
$html .= '
';
$html .= '
';
// By default the database of categories are alphanumeric sorted
foreach ($categories->db as $key=>$fields) {
$count = count($fields['list']);
if (!$this->getValue('hideCero') || $count>0) {
$html .= '