class gezcViewVliegtuigen extends JViewLegacy
    protected $editID = 0;

     // if task is not specifiek in the url als parameter, display will be used
    function display($tpl = null)
        $app = JFactory::getApplication();
        $context = "com_gezc.list.site.vliegtuigen";

        // aanroep URL
        $uri = JFactory::getURI();
        $this->requestURL = $uri->toString();

        // Assign data to the view
        $this->vliegtuigen = $this->get('Vliegtuigen');
        $this->paginas = new JPagination($this->get('Aantal'), $this->get('Start') , $this->get('Limit'));

        $this->state = $this->get('State');
        $this->filter_order     = $app->getUserStateFromRequest($context.'filter_order', 'filter_order');
        $this->filter_order_Dir = $app->getUserStateFromRequest($context.'filter_order_Dir', 'filter_order_Dir', 'asc', 'cmd');
        $this->filterForm       = $this->get('FilterForm');
        $this->activeFilters    = $this->get('ActiveFilters');

        // Check for errors.
        if (count($errors = $this->get('Errors')))
            JLog::add(implode('<br />', $errors), JLog::WARNING, 'jerror');

            return false;

        // Set the toolbar

        // Set the document

        // Display the view
    protected function addToolBar()

    protected function setDocument() 
        $isNew = true; // ($this->item->id < 1);    TODO
        $document = JFactory::getDocument();
        $document->setTitle($isNew ? JText::_('COM_GEZC_VLIEGTUIGEN_TITEL_CREATING') :


JHtml::_('behavior.framework', true);

// TODO 
JHtml::script("https://cdn.jsdelivr.net/npm/[email protected]/dist/js/uikit.min.js");
JHtml::stylesheet('https://cdn.jsdelivr.net/npm/[email protected]/dist/css/uikit.min.css');

$listOrder     = $this->escape($this->filter_order);
$listDirn      = $this->escape($this->filter_order_Dir);

<form action="<?php echo $this->requestURL; ?>" method="post" id="adminForm" name="adminForm">
<div class="row-fluid">
        <div class="span6">
                echo JLayoutHelper::render(
                    array('view' => $this)

    <div class="uk-overflow-auto">
        <table class="table uk-table-striped uk-table-small uk-table-hover" id="tableX">
    <input type="hidden" name="task" value=""/>
    <input type="hidden" name="boxchecked" value="0"/>  
    <input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>"/>
    <input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>"/>

    <?php echo JHtml::_('form.token'); ?>  

The table and the search bar is nice displayed. The filter works correctly, but for some reason the toolbar is not displayed.

I tried to check the implementation in Joomla, but there is a lot of magic going on under the hood. Can some explain what I am doing wrong and how it works within de Joomla framework?

  • Welcome to JSE. Please take our tour while you wait for support. Consider giving yourself a more human username and perhaps tell us a little about yourself /your Joomla experience in your profile. Commented Aug 4, 2020 at 20:10
  • Odd...I dropped your code into an existing component and the New button appears just fine...
    – Grant G
    Commented Aug 4, 2020 at 23:52
  • 1
    Is this by chance a frontend view?
    – Sharky
    Commented Aug 5, 2020 at 8:26
  • Yes, this is a frontend view. It is located in the site folder within the custom component. Basically the logged in user need to be able to add a record when using the frontend. Commented Aug 5, 2020 at 9:29

1 Answer 1


Toolbar isn't really supported in frontend. In backend it's rendered by mod_toolbar module which is only available in backend.

You can still render the toolbar in frontend using this code but it may not necessarily work correctly:

echo Joomla\CMS\Toolbar\Toolbar::getInstance('toolbar')->render('toolbar');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.