Bug #23192 See Comments

Custom add-on: header search bar not displayed

Version: 3.5.10 Reporter: Louis D.

This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report

Hi there,

So I need to add a search bar to my add-on, just like there’s one on the template manager page.

Looking at the documentation, I see that I need to use that code:

ee()->cp->header = array(
  'title' => lang('template_manager'),
  'form_url' => ee('CP/URL')->make('design/template/search', array('return' => $return)),
  'toolbar_items' => array(
    'settings' => array(
      'href' => ee('CP/URL')->make('settings/template'),
      'title' => lang('settings')
    ),
  ),
  'search_button_value' => lang('search_templates')
);

This correctly adds a settings icon in front of the title. But it doesn’t display a search bar. I do remember this was working well in previous versions, although I can’t remember which one exactly.

I’m using that code to render the view

return array(
      'heading'   => lang('...'),
      'body'    => ee('View')->make('...:index')->render($vars),
      'breadcrumb'  => array(
       ee('CP/URL', 'addons/settings/...')->compile() => lang('..._module_name')
      ),
     );

Am I doing something wrong ?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases