End of Support for Joomla 3 - Forum closed
Change Standard Filter in mosaic
- brandiware
- Offline Topic Author
- Fresh Boarder
- Posts: 18
- Thank you received: 0
Hi,
anyone succeeded in changing the standard filtering in the mosaic module from "all" to any of the custom tagged-filters ?
I appreciate any help.
Thanks
Stefan
anyone succeeded in changing the standard filtering in the mosaic module from "all" to any of the custom tagged-filters ?
I appreciate any help.
Thanks
Stefan
by brandiware
Please Log in or Create an account to join the conversation.
- joomlaplates
- Offline
- Moderator
- Posts: 8807
- Thank you received: 1732
Replied by joomlaplates on topic Change Standard Filter in mosaic
Posted 8 years 5 months ago #14248
Sorry not possible!
Dokumentation:
www.joomlaplates.de/dokumentation.html
www.joomlaplates.de/dokumentation.html
by joomlaplates
Please Log in or Create an account to join the conversation.
- brandiware
- Offline Topic Author
- Fresh Boarder
- Posts: 18
- Thank you received: 0
Sorry to disagree. It is possible indeed. I changed it in the roksprocket component (PHP and JavaScript).
This way the "All" filter is removed and I can decide which filter applies after the page is loaded.
I could not yet prevent the mosaic to load all in the first place - at the moment I simply do a re-filtering right after the page is loaded.
A cleaner solution, of course, would be a specific feature of the mosaic to define the default filter-tag.
I still hope for rockettheme to work on their code.
This way the "All" filter is removed and I can decide which filter applies after the page is loaded.
I could not yet prevent the mosaic to load all in the first place - at the moment I simply do a re-filtering right after the page is loaded.
A cleaner solution, of course, would be a specific feature of the mosaic to define the default filter-tag.
I still hope for rockettheme to work on their code.
by brandiware
Please Log in or Create an account to join the conversation.
- brandiware
- Offline Topic Author
- Fresh Boarder
- Posts: 18
- Thank you received: 0
Here is the quick fix for the filtering. It is not clean but it works....
RokSprocket_Layout_Mosaic.php
in Funktion renderInstanceHeaders()
add these lines to the addEvent('load') funktion:
$js[] = " var x = document.getElementsByClassName('sprocket-mosaic-filter')[0].getElementsByTagName('li');";
$js[] = " RokSprocket.instances.mosaic.filterBy('load', document.getElement('div.sprocket-mosaic'), x[1]);";
RokSprocket_Layout_Mosaic.php
in Funktion renderInstanceHeaders()
add these lines to the addEvent('load') funktion:
$js[] = " var x = document.getElementsByClassName('sprocket-mosaic-filter')[0].getElementsByTagName('li');";
$js[] = " RokSprocket.instances.mosaic.filterBy('load', document.getElement('div.sprocket-mosaic'), x[1]);";
by brandiware
Please Log in or Create an account to join the conversation.
Moderators: joomlaplates