In my custom components I often use filters and searchbar for views based on JModelList structure. It's clear for me how to set up model/view params and filters, but I'm not sure of the default.php code to print filters (even if it works). This is my current code:

<form class='filter-form'>
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>

Is it correct to add manually a form or is there a Joomla way to do it? Should I add some attributes to the form tag?


Your Answer

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

Browse other questions tagged or ask your own question.