Beispiel #1
0
    public function display($tpl = null)
    {
        $this->items = $this->get('Items');
        // the active item on the sidebar menu should be preview:
        FolioHelper::addSubmenu('preview');
        if (count($errors = $this->get('Errors'))) {
            JError::raiseError(500, implode("\n", $errors));
            return false;
        }
        $this->addToolbar();
        $j3css = <<<ENDCSS
\t\tdiv#toolbar div#toolbar-back button.btn span.icon-back::before {
\t\t\tcontent: "";
\t\t}
\t\t.folio_title{
\t\t\tcolor: #555555;
\t\t\tfont-family: 'Titillium Maps',Arial;
\t\t\tfont-size: 14pt;
\t\t}
\t\t.myfolio{
\t\t\tpadding-bottom: 20px;
\t\t\tfloat: left;
\t\t\tpadding-right: 20px;
\t\t}
\t\t.folio_element{
\t\t\twidth: 150px;
\t\t\tpadding-top: 2px;
\t\t}
ENDCSS;
        JFactory::getDocument()->addStyleDeclaration($j3css);
        $this->sidebar = JHtmlSidebar::render();
        parent::display($tpl);
    }
Beispiel #2
0
 public function display($tpl = null)
 {
     //The $this->get('Items')call gets the data from the model file /administrator/components/com_folio/models/folios.php
     $this->items = $this->get('Items');
     $this->state = $this->get('State');
     //---------------------
     $this->pagination = $this->get('Pagination');
     //-----------
     FolioHelper::addSubmenu('folios');
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     //The addToolbarfunctionwill add all the buttons at the top of the view such as New, Edit, Options, and so on.
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     //----------------
     parent::display($tpl);
 }