'Render the content of default_filter.php in Joomla front-end
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.
Solution 1:[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/');
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Mehdi Tahani zadeh |