I'm trying to render the joomla.searchtools in the front end of a custom component.
I extended JModelList for my model, and I can see the list in the front end. Pagination works well.
But when in my template I add:
echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this) ); I get an error message like this:
0 Call to a member function getGroup() on null
If I change the code above with:
<div class="btn-wrapper input-append"> <input type="text" name="filter[search]" id="filter_search" value="" class="js-stools-search-string" placeholder="Search"> <button type="submit" class="btn hasTooltip" title="" aria-label="Search" data-original-title="Search"> <span class="icon-search" aria-hidden="true"></span> </button> </div> The search filter shows and works well.
What have I forgotten?