protected function createControls()
 {
     $button = new ButtonControl($this, 'button');
     $button->setCaption('Neuen Artikel anlegen')->setIcon('plus')->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setLink('cms', 'newArtikel', array('kategorie' => $this->controller->kategorie->id));
     $button = new ButtonControl($this, 'btnSort');
     $button->setCaption('Artikel neu sortieren')->setLink('cms', 'sortArtikel', array('kategorie' => $this->controller->kategorie->id));
     $template = '
             {ca_pos}
             <a href="' . Application::link('cms', 'posUp') . '/id/{ca_id}">' . Template::img('icons/arrow_up.png', true) . '</a>
             <a href="' . Application::link('cms', 'posDown') . '/id/{ca_id}">' . Template::img('icons/arrow_down.png', true) . '</a>
         ';
     $grid = new GridControl($this, 'grid');
     $grid->setEntity(new Model\CmsArtikel(), $this->request);
     $grid->setDeleteAction('deleteArtikel');
     $grid->setSortable(true);
     $grid->createColumn(GridColumn::LINK, 'ca_bezeichnung')->setAppLink('cms', 'editArtikel', array('id' => '{ca_id}'));
     $grid->createColumn(GridColumn::FIELD, 'ca_aktiv');
     $grid->createColumn(GridColumn::FIELD, 'autor');
     $grid->createColumn(GridColumn::FIELD, 'ca_geschrieben_am');
     $grid->createColumn(GridColumn::FIELD, 'ca_lastedit');
     $grid->createColumn(GridColumn::FIELD, 'ca_pos', $template);
     $grid->createColumn(GridColumn::LINK, null, Template::img('icons/sitemap_color.png', true))->setAppLink('site', 'newPage', array('site' => 2, 'mi_module' => 'cms', 'mi_action' => 'show', 'mi_id' => '{ca_id}', 'text' => '{ca_bezeichnung}'), null, 'Zu Sitemap hinzufügen');
     $grid->createColumn(GridColumn::DELETELINK);
 }
 protected function createControls()
 {
     $grp = new ButtonGroupControl($this, 'btngrp');
     $button = new ButtonControl($grp, 'button');
     $button->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setCaption('Neue Seite anlegen')->setIcon('plus')->setLink('site', 'newPage', array('site' => $this->controller->site->id));
     $button = new ButtonControl($grp, 'btnSort');
     $button->setCaption('Seiten neu sortieren')->setLink('site', 'sortPages', array('site' => $this->controller->site->id));
     $button = new ButtonControl($grp, 'btnFlush');
     $button->setCaption('Cache leeren')->setLink('site', 'flushCache', array('site' => $this->controller->site->id));
     $grid = new GridControl($this, 'grid');
     $grid->setEntity(new Page(), $this->request);
     $grid->setDeleteAction('deletePage');
     $grid->setSortable(false);
     $template = '
             {pa_pos} 
             <a href="' . Application::link('site', 'pageUp') . '/id/{pa_id}">' . Template::img('icons/arrow_up.png', true) . '</a>
             <a href="' . Application::link('site', 'pageDown') . '/id/{pa_id}">' . Template::img('icons/arrow_down.png', true) . '</a>
         ';
     $grid->createColumn(GridColumn::LINK, 'pa_bezeichnung')->setAppLink('site', 'editPage', array('id' => '{pa_id}'));
     $grid->createColumn(GridColumn::FIELD, 'parent');
     $grid->createColumn(GridColumn::FIELD, 'pa_pos', $template);
     $grid->createColumn(GridColumn::DELETELINK);
     $grid->groupColumn = 1;
 }