Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author livemesh

    (@livemesh)

    The JS which makes the filter happen expects the link to be within .lsow-portfolio-wrap .lsow-taxonomy-filter .lsow-filter-item parent hierarchy and hence your code won’t work.

    Pls have a look at the <plugin folder>/includes/widgets/lsow-portfolio-widget/js/portfolio.js file line 23,24 to know how this is done. You will need to know bit of JS to pull this off.

    Thread Starter gquick128

    (@gquick128)

    thank’s for your reply, i will try it.

    Thread Starter gquick128

    (@gquick128)

    Hello,
    After a few hours of work, i got the result I wanted.

    I put this addon at the end of <plugin folder>/includes/widgets/lsow-portfolio-widget/js/portfolio.js :

    // Addon for allow external link custom filtering
    	// Add externals links in div with class lsow-portfolio-custom-filter
    	// the link form must be href="#lsow-portfolio-custom-filter-x" , x=0,1,2,3,...
    	// and select the corresponding segment number
    	$('.lsow-portfolio-custom-filter').each(function () {
    		// Find the lsow-portfolio in globale document
    		var pf_container = $(document).find('.lsow-portfolio');
    		if (pf_container.length === 0) {
    			return;
    		}
    		var pf_header = pf_container.closest('.lsow-portfolio-wrap').find('.lsow-portfolio-header .lsow-taxonomy-filter');
    
    		$(this).find('a').on('click', function (e) {
    			e.preventDefault();
                var segment = $(this).attr('href').replace("#lsow-portfolio-custom-filter-",".segment-");
                var new_active = pf_header.find(segment);
    			var selector = new_active.find('a').attr('data-value');
                pf_container.isotope({ filter: selector });
    			pf_header.children().removeClass('lsow-active');
    			new_active.addClass('lsow-active');
                return false;
    		});
    	});

    and now i can add links in any div class “lsow-portfolio-custom-filter”
    with de href=”#lsow-portfolio-custom-filter-N” N=0,1,2,3,…
    it work perfect with SiteOrigine Image Grid :
    – put “lsow-portfolio-custom-filter” in Attribut Class widget
    – put #lsow-portfolio-custom-filter-1, lsow-portfolio-custom-filter-2 etc in each url image.
    that’s make a great image grid filter for portfolio.
    same config with Livemesh Button … and another way to filter portfolio.

    Thank’s for your help.
    Perhaps this add on could be include in your next release ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Livemesh grid – add external filter’ is closed to new replies.