Select multiple Filters

Permalink Browser Info Environment
Hi there,

Is it possible to make multiple tags selectable?

For example,with the attached sample, I'd like to be able to select multiple tags to narrow down the search.

1 Attachment

Type: Discussion
Status: Archived
ettlin
View Replies:
Parasek replied on at Permalink Reply
Parasek
Hi,

its not possible right now (at least not possible to make it easily).
From the beginning, it was designed to filter by only one tag.

Cheers
ettlin replied on at Permalink Reply
ettlin
Hi,

thanks for the quick reply! Out of curiosity, could you tell me how to implement the function, even if it's not the easy way?
Parasek replied on at Permalink Reply
Parasek
I may have oversell it, wasn't that hard.

Replace file:
packages/grand_gallery/blocks/grand_gallery/js_files/gallery-with-masonry.js

Toggle multiselect in line 61 and filtering method in line 64 (and/or).
Also change multiSelectEnabled variable in line 147.

I will implement this in package later, but no ETA for that.
You can beta-test it for now and notify me if you find any bugs:D

$(function () {
    var GrandGalleryWithMasonry = (function ($, window, document, undefined) {
        var grids = [];
        var numberOfImagesAtStart  = [];
        var numberOfImagesToReveal = [];
        var galleryRevealMethod    = [];
        // Number of visible images after initial load / "Tag" click / "Show more" click
        var counter = [];
        var allowCheckingIfReachedBottom = true;
        var allowTriggeringClickEvent    = true;
        var initIsotopeBlocks = function () {
            $('.js-gg-container-masonry').each(function() {
                var blockID = $(this).attr('data-block-id');
                numberOfImagesAtStart[blockID]  = parseInt($('.gg-container-'+blockID).attr('data-number-of-images-at-start'));
                numberOfImagesToReveal[blockID] = parseInt($('.gg-container-'+blockID).attr('data-number-of-images-to-reveal'));
ettlin replied on at Permalink Reply
ettlin
Hello Parasek

Thank you so much! You truly saved the day.

Your solution works wonderfully. After going down rabbit holes and testing different add-ons I was pretty much ready to accept, that selecting multiple tags is just not going to work.

Having such an easy adaption, is really nice. I’ll let you know if bugs should show up, but for now it seems to be working just fine. :)

concrete5 Environment Information

# Concrete Version
Core Version - 9.1.3
Version Installed - 9.1.3
Database Version - 20220908074900

# Hostname
summer.metanet.ch

# Environment
production

# Database Information
Version: 10.3.35-MariaDB
SQL Mode: NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

# Concrete Packages
Form Reform (9.0.2), Form Reform Display (0.2.0), Grand Gallery (2.1.1), Modena Theme (2.1.0), Simple Gallery (2.1.0), Two-Step Authentication Advanced (0.9.0.1)

# Concrete Overrides
None

# Concrete Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
fpm-fcgi

# PHP Version
7.4.33

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, intl, ionCube Loader, json, ldap, libxml, mbstring, msgpack, mysqli, mysqlnd, odbc, openssl, pcre, PDO, pdo_mysql, PDO_ODBC, pdo_sqlite, Phar, posix, pspell, redis, Reflection, session, shmop, SimpleXML, soap, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 120
log_errors_max_len - 1024
max_file_uploads - 100
max_input_nesting_level - 64
max_input_time - 120
max_input_vars - 200000
memory_limit - 512M
post_max_size - 512M
upload_max_filesize - 512M
ic24.api.max_timeout - 7
ldap.max_links - Unlimited
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
redis.pconnect.connection_limit - 0
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
unserialize_max_depth - 4096
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.