<li><a class="filterbutton" data-option-value=".<?php print $dataoption; ?>" href="#filter"><?php print trim($row); ?></a></li>

this should be getting filled right?
i try this with the "node: type" - and fail ...

mine looks like:
<li><a href="#filter" data-option-value="." class="filterbutton"></a></li>

have you got a tip :)
i think it's another typical use case, like terms ...

thanks

Comments

sachbearbeiter’s picture

Issue summary: View changes

formatting

kreynen’s picture

I just created a screencast for this yesterday. Take a look and see if your issue is addressed...

https://vimeo.com/40662343

If not, let me know and I'll take a look. I don't know any reason why type wouldn't work as a filter.

kreynen’s picture

Status: Active » Closed (works as designed)

Looking at this again with fresh eyes/head, the issue with creating this type based filter would be finding a way to output the content/entity types from a site as a view. Adding the type field to the output is easy. I looked for a view module to handle the Isotope filter block and came up empty. You could create this using a custom block that calls node_type_get_types and uses the formatting found in http://drupalcode.org/project/views_isotope.git/blob/refs/heads/7.x-1.x:...

I'm closing this because it isn't really an issue with views_isotope, but a missing View to return the content/entity types on a site.

sachbearbeiter’s picture

thanks for the research - i had to find a fast solution and do it now manually with views and isotope and a simple block ...

Adam Wood’s picture

In case anyone comes across this issue, we found a relatively simple way of achieving this within Views:

  1. Create an Isotope Grid view (or use the example), and specify the field 'Content: Type', with no options ticked except for 'Customise field HTML' with a div class 'isotope-filter'. And make sure you remove the Tags field if you're using the example.
  2. Next create the Isotope Filter Block View (don't use the example), a standard 'Show content of all' block.
  3. Remove the 'Title' default field, and add 'Content: Type', leaving everything un-ticked.
  4. Filter the view by the specific content types you want to use (if it's not all of them). You should then have a list of the content types for your corresponding nodes.
  5. Under 'Advanced', switch aggregation on.
  6. Add a sort criteria of 'Content: Type', and you'll be prompted to select an aggregation type. Select 'Count'.
  7. Your list should now be filtered to just one of each content type, which you can further sort if you wish, i.e, alphabetically.
  8. Save the filter view, go back to the Isotope Grid view and add the filter view to the header as usual.

It's not the prettiest solution, but it saves people getting their hands dirty, and the filters can be easily managed via the Views UI.

Adam Wood’s picture

Issue summary: View changes

example added

idiaz.roncero’s picture

Adam Wood's solution worked for me and saved my day...

many thanks!

panditvarun20’s picture

Can anyone tell me the step by step views isotope tutorial?

kreynen’s picture

Issue summary: View changes

@panditvarunHSK your issue has nothing to do with filtering for node type. PLEASE stop posting the same question in multiple issues.