1

I made a custom component with a table that needs some filters.
I render the filter fields on my view by doing this:

This is the code inside tmpl/supportcases/default.php

<?php if(!empty($this->filterForm)) { echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); } ?>

This code was already predefined when I created my component.

However, the tmpl/supportcases/default_filter.php file is not used.
It now renders the content of layouts/joomla/searchtools/default.php
How can I make sure it renders the content of tmpl/supportcases/default_filter.php instead?

The purpose of this is that I want to create a custom lay-out for my filter fields instead of rendering them automatically in a loop.

Hope someone can help me with this.

TheRanger
  • 43
  • 4
  • As you can see, too often Joomla questions on Stack Overflow encounter underwhelming support/feedback. Please join [joomla.se] Stack Exchange and ask all of your Joomla questions there. – mickmackusa Jan 31 '22 at 06:50

1 Answers1

1

I solved this problem You must use the following command

echo LayoutHelper::render('default_filter', array('view' => $this), JPATH_ROOT . '/components/com_mycomponent/tmpl/supportcases/');
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 02 '22 at 04:24