User tests: Successful: Unsuccessful:
Yes, Currently there is no such provision to show filters container by hiding the "search tools" button. Most of the times in frontend, user don't want an extra click to open the filters. So, we need a facility to show only the filters container of the search tool.
Need to add a config in custom options for showing the filter container and hide the "search tools button".
It will reduce the number of clicks for better user experience.
Sometimes there are only one or to filter fileds in filter container so its is not needed show the "search tools" button. Instead of that, we can show the filter container directly.
For example :-
We need to pass one extra param at the time of rendering respective search toolbar, on the basis of this it will hide the "search tools" button and directly show the filter container.
While rendering search tools use showOnlyFilters parameter and set it as 1.
JLayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('showOnlyFilters' => 1)));
Status | New | ⇒ | Pending |
Category | ⇒ | Layout JavaScript |
@mbabker - We don't have such configuration, we have filterHidden -> which always keeps the "search tool" open, and filterButton-> which hides button as well as the container.
As you can see below screenshot, when we apply filtersHidden config -> it gives such display,
where "search tools" button is visble, which confuses the users.
@mbabker -> as you can check the old code "<?php if ($data['options']['filterButton']) : ?> <div class="js-stools-container-filters hidden-phone clearfix<?php echo $filtersActiveClass; ?>"> <?php echo $this->sublayout('filters', $data); ?> </div>
"
filters are dependent on "search tool" button.
If I use the filters layout directly to show the filters, the clear button won't work for the filters.
Title |
|
I have tested this item
I have tested this item
I have tested this item
maybe I did not understand the right code to use.
I tested com_associations in /administrator/components/com_associations/views/associations/tmpl/default.php
I modified the call there to
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this, options => array('showOnlyFilters' => 1))); ?>
to test.
I get a Notice:
Notice: Use of undefined constant options - assumed 'options' in .../administrator/components/com_associations/views/associations/tmpl/default.php on line 63
Just a typo in the code. Use quoted 'options' => ...
not options => ...
!
I just copied what was in the original PO...
Will modify it there now.
Labels |
Added:
?
|
Title |
|
Title |
|
Title |
|
Title |
|
Shouldn't this PR get a RTC
OR
shouldn't it be closed because "No new features allowed in Joomla 3!"
calling @HLeithner as Release Lead J3 for Comment above.
Sorry to say that's a new feature and 3.x has a feature freeze plz get involved into the J4 development.
The backend template team is rewriting many parts of the template code so maybe you check the current j4 backend template code base at https://github.com/joomla/backend-template
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-05-10 12:39:47 |
Closed_By | ⇒ | HLeithner | |
Labels |
Removed:
J3 Issue
|
There are already other options to configure this behavior if I've read the layout file correctly. So what is adding this option actually accomplishing that can't already be done?