End of Support for Joomla 3 - Forum closed

Change Standard Filter in mosaic

Change Standard Filter in mosaic was created by brandiware

Posted 7 years 10 months ago #14238
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

Please Log in or Create an account to join the conversation.

Replied by joomlaplates on topic Change Standard Filter in mosaic

Posted 7 years 10 months ago #14248
Sorry not possible!

Please Log in or Create an account to join the conversation.

Replied by brandiware on topic Change Standard Filter in mosaic

Posted 7 years 10 months ago #14260
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.

Please Log in or Create an account to join the conversation.

Replied by brandiware on topic Change Standard Filter in mosaic

Posted 7 years 10 months ago #14314
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]);";

Please Log in or Create an account to join the conversation.

Moderators: joomlaplates

Installations-Service

Don´t waste your time, we install your purchased Template
with the "Demo Content" within the next 24 hours.

Buy Now - 59€

Joomlaplates/Theme-Point is not affiliated with or endorsed by Open Source Matters or the Joomla! Project

Copyright © 2022 JoomlaPlates | Professional Joomla Templates with Uikit 3

Disclaimer & Privacy | License