/*
  *  Liste anlegen 
  */
 if (empty($category_id)) {
     $category_id = 0;
 }
 $sql = 'SELECT * FROM rex_article WHERE re_id=' . $category_id . ' AND startpage=1 AND clang=' . $clang;
 // Standard sortierung nach CATPRIOR aufsteigend
 // Standard suchspalte ist Name
 $list = new rexlist($sql, 'catprior', 'asc', 'name');
 /*
  *  Spalten aus dem SQL-ResultSet anlegen 
  */
 $colId = new resultColumn('id', 'ID');
 // ID zentrieren
 $colId->setBodyAttributes('style="text-align: center"');
 $colName = new resultColumn('name', 'Kategorie', '', '%name% [%id%]');
 $colPrio = new resultColumn('catprior', 'Prio');
 /*
  *  Statische Spalten anlegen 
  */
 // Icon Spalte
 $colIcon = new staticColumn('<img src="pics/folder.gif"/>', '<img src="pics/folder_plus.gif"/>');
 // Icons zentrieren
 $colIcon->setHeadAttributes('style="text-align: center"');
 $colIcon->setBodyAttributes('style="text-align: center"');
 // Bearbeiten Spalte
 $colEdit = new staticColumn('Kategorie editieren/löschen', 'Kategorie editieren');
 // Online/Offline Spalte
 $colOnOffline = new staticColumn('', 'Status/Funktion');
 $colOnOffline->addCondition('status', '1', '<span style="color: #00aa00;">online</span>', array('func' => 'status', 'mode' => 'offline_it', 'category_id' => '%id%'));