Development Guide

Panel

This is deprecated use the Panel classes from the Kitchensink instead.

ILIAS 5.0 introduces a bootstrap based skin with a general grey background. Panels can be used to create content boxes on top of this background. They usually have a lighter background an more contrast.

1
2
3
4
5
6
include_once("./Services/UIComponent/Panel/classes/class.ilPanelGUI.php");
$my_panel = ilPanelGUI::getInstance();
$my_panel->setHeading($lng->txt("..."));
$my_panel->setBody($main_content);
$my_panel->setHeadingStyle(ilPanelGUI::HEADING_STYLE_SUBHEADING);
$tpl->setContent($my_panel->getHTML());

Panels support two main styles, controlled by setPanelStyle(). Primary content areas shoud use the PANEL_STYLE_PRIMARY style. Other areas (e.g. side blocks) which do not containe primary content should use PANEL_STYLE_SECONDARY.
 
Headings are optional and support two different styles, too - setHeadingStyle(). Side blocks should set HEADING_STYLE_BLOCK. Content in the center area usually set HEADING_STYLE_SUBHEADING.