Closed (fixed)
Project:
Views Isotope (Deprecated)
Version:
7.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2013 at 12:41 UTC
Updated:
5 Feb 2016 at 18:34 UTC
Jump to comment: Most recent
Comments
Comment #1
kreynen commentedSince JQuery BBQ is included in core for overlay, I don't see why this wouldn't work. Have you tried loading /misc/jquery.ba-bbq.js on the page of the view you want to use? Shouldn't require any changes this module's code to work.
Comment #2
asioren commentedYes, I've loaded jquery.ba-bbq.js on the page of the view but didn't manage to implement the hash.
I also changed the code for the filter menu to look like:
<li><a class="filterbutton" href="#filter=*" class="selected">show all</a></li>instead of:
<li><a class="filterbutton" data-option-value="*" href="#filter">show all</a></li>and also included this little script I found to implement the hash on click:
But it seemed like something in the model code was interfering. I could manage to get the hash to work without the isotope or the reverse but not both of them together.
any help about the code needed to implement this with isotope views will be greatly appreciated.
I believe this addition to this great model will make it much much stronger and useful :)
Comment #3
cees.vanegmond commentedasioren,
First make shure bbq is loaded (for non overlay users), add in hte .js
$.getScript("/misc/jquery.ba-bbq.js")
Next you should change:
$('#isotope-options a').click(function() {
in
$('.isotope-options li a').click(function() {
Comment #4
audriusb commentedjavascript gives error on
$container.isotope(hashOptions);line because this $container is a private variable. go to sites/all/modules/views_isotope/views_isotope.js and remove 'var' in line 4. Now you can access this object site wide.
Comment #5
caspervoogt commentedyou also need to remove var from 'var $optionSets' in views_isotope/views_isotope.js
Correction: no you don't need to remove this. I was using different JS code. Will post working code in a moment.
Comment #6
caspervoogt commentedI got this working so that the selector class is also reassigned when you call a hash URL. Here's what I did:
Code for views-isotope-filter-block.tpl.php:
I would like to not have the dots in the hash URLs so that http://www.mysite.com/isotopeview#filter=.somefilter would become http://www.mysite.com/isotopeview#filter=somefilter. That would require a change to views_isotope/views_isotope.theme.inc. The relevant code is:
I did not attempt this change because I'm unsure what else I might affect in the process. Would be great to not have to have dots in the hash URLs though.
Comment #7
caspervoogt commentedI made a patch for #4... the comment box won't let me attach files.. there's no option to attach anything..
So here it is:
If the above TPL and patch work for others, I can update this issue with the patch file as an attachment. Weird that I can't attach files to comments. I swear that used to be possible.
Comment #8
johnnymowmow commentedThank you all. I was able to get this working with the recommended changes.
However, I placed the isotope-filter-block in the navigation region and am using bootstrap ul class "nav nav-bar" - so I had to modify a small amount to use
<li class="active">vs<a class="selected">. I'm posting this here to help out any future readers also using bootstrap.I used:
#2 - Add custom "All" filter to views-isotope-filter-block.tpl.php *note this
<li>is "active" by default.<li class="active"><a class="filterbutton" data-option-value="*" href="#filter=*">All</a></li>#4 - removed "var" as instructed.
#6 -
(#6 JQuery) *slightly modified to remove "active" from
<li>and add to<li>vs.<a>(#6 HTML) *note ul class has added "nav" and "navbar-nav" for bootstrap. This block was assigned to the "Navigation" region when configuring the block. Also, my loop and code for getting the value for the filter was pulled from the original code of isotope view module.
Now on to figure out how to incorporate infinitescroll...
Comment #9
johnnymowmow commentedOne more thing, hash bbq script is loaded for Admin - not anonymous. So make sure you add the script for the page as #3 suggests.
Comment #10
Chris Gillis commentedI'm planning to add this to the 2.x branch. See also #2170149: External Link to filtered isotope view - how to?
Comment #11
Chris Gillis commentedI've just committed code that allows filters and sorts to be represented in the URL fragment. If anyone is available to test it on the latest dev version, that would be great. You'll see a new option in the config for it.
I have decided not to use BBQ for the following reasons:
Comment #12
Chris Gillis commentedComment #13
Chris Gillis commented