- Gallery Filter Portfolio Filter For Gallery Element 2017
- Gallery Filter Portfolio Filter For Gallery Element Dryer
- Gallery Filter Portfolio Filter For Gallery Element 2018
- Gallery Filterportfolio Filter For Gallery Elements
- Gallery Filter Portfolio Filter For Gallery Element Replacement
Webflow is an incredibly flexible tool. And while it doesn't offer a native solution to every problem, custom code makes it possible to implement almost anything your audience might need — including the ability to find what they need. Whether it's a blog, a portfolio, or an ecommerce project, people want to find what they need quickly and easily. With that in mind, I'm going to show you how to integrate the MixitUp JavaScript library so your audience can filter and sort content.
In this tutorial, I'm going to show you how to create portfolio page with filtering and also hover effect for each of your project item. We will be using a CSS3 and jQuery filter & sort plugin called MixItUp. Thanks for reply RT, Actually I was trying to ask for set default selection to the first item in a gallery. The second Question is an issue actually, the filtered items show a blank screen until I click on any item of Filtered Gallery, as You can see in my attached Image. Adding Filters with Images Into Portfolio Filter Gallery. To add filters with images click on filters which you want to add with the image. If you want to place one image into multiple filters use control (Ctrl) key from the keyboard; You can give the image title and image link also. When you apply a filter in Photoshop Elements 11, you may be presented with a huge dialog box. This editing window is officially named Filter Gallery. You can also access it by choosing Filter→Filter Gallery. In the flexible Filter Gallery, you can apply multiple filters, delete them, and edit them to your heart's content.
Why MixItUp3?
MixItUp3 is a dependency-free, client-side JavaScript library for animated filtering and sorting. It's great for managing content that needs to be categorized or ordered like portfolios, galleries, stores, and blogs. It can be used with both static and dynamic content.
Anything you can display on the page can be categorized, filtered, and sorted by:
- Date
- Price
- Category
- Tag
- A combination of the above
When a website visitor selects a filter, MixitUp shows elements with the class name specified in the filter settings and hides the rest.
The library is powerful and includes a variety of features. The basic functionality of MixitUp is open-source and free to use for personal projects. If you're using it for commercial projects, you'll need to buy a license with a one-time, reasonably priced fee.
In this tutorial we'll look at the most common uses for MixItUp3:
- Filtering content on a simple, static page
- Filtering and sorting dynamic posts on a CMS-powered blog page
1. Filtering content on a simple, static page
The free Webflow template Incredible is a great fit for our first example. Let's filter the template's photo gallery.
Step 1: Creating a layout
By default, MixItUp will check the HTML structure of the page, look for a div with the class name we'll specify in the Designer and in the code, and filter all elements that match the class name mix inside that div.
So, our layout should contain a div with items with the class mix. Let's call that div mix-container
Note: The template we're using for this tutorial already has some existing class names — sometimes we'll use combo classes or rename existing classes which will work just fine for filtering purposes. In your original project, you can create all class names and styles.
Step 2: Applying filtering categories
To let MixItUp filter elements, each element should have a class name that specifies the category it belongs to. We'll apply those selectors as a combo-classes to each mix element.
For our photo gallery, these combo classes will be types of photos:
- black-and-white
- macro
- nature
- people
- travel
Step 3: Creating filter controls
You can make filter controls out of different types of HTML elements like buttons, links, or input elements (checkboxes, selects etc.). In this case, buttons work nicely.
Let's create a filter-controls div and put all our filter-button elements inside it. We need one button for each category, plus one to let the user clear all filters.
Now, for each filter button, we need to add a custom attribute of data-filter. The value of the>
Now we'll point the MixitUp code to the right container:
<br><em>// Set the reference to the container</em><br> const containerEl = document.querySelector ('.mix-container')<br><em>// Call the MixitUp to that container</em><br> var mixer = mixitup(containerEl)<br>
That's it! Now publish your website and enjoy the results.
My version of the Incredible template where I used MixItUp to filter content on a simple, static page is available to clone and use on the Webflow Showcase.
2. Filtering and sorting dynamic posts on a CMS-powered blog page
Gallery Filter Portfolio Filter For Gallery Element 2017
For the second example, we'll use another free Webflow blog template called Notable.
The blog on this template has quite a few posts with different categories and authors. For a better and more obvious sorting experience, I added an additional field I called Publish Date.
Note: The template includes a date field, but because those dates are all the same by default, there's nothing for MixItUp to sort. To work around this, I added a second date field and manually made each one different. Since blog posts aren't typically published all at once, this won't be a necessary change for most cases.
Now we'll build filters for our blog posts so the reader can filter content by category and sort by date.
Step 1: Creating a layout
From our first example, we already know that MixitUp will look for a div with the specified class name and filter elements that match the class name .mix
With the dynamic content, we'll be pointing MixitUp to a specific collection list, which is a div that contains all the elements we need to filter. This means all our collection items need to have the class name mix (either as a main or combo class).
Build completely custom, production-ready websites — or ultra-high-fidelity prototypes — without writing a line of code. Only with Webflow.
Step 2: Creating filtering and sorting attributes
Webflow CMS gives us the ability to dynamically output content and categories according to the contents of a database. But in Webflow, we can't natively create different classes for each collection item (which is what we did for static content).
This is where JavaScript comes in. In this step, we're going to prepare the correct structure to make sure the JavaScript works later with our custom code.
All categories that we're using to filter and sort should be presented inside the mix item. Preferably, we want to keep the same level of nesting to make the custom code less messy.
These categories don't necessarily need to be visible. If you need to hide them, you can use the display option none — just make sure they exist in the HTML structure.
We'll be filtering our blog posts by category and sorting by date, so we want to make sure we have both of these fields populated. To make sure sorting by date works correctly, we have to make sure that our publish date is populated in the format year-month-day. This is important because the code parses the date in that order.
The last thing we'll do in this step is specify class names for elements that have filtering and sorting categories. In our template, some elements already had classes, so we added the combo classes filter-category and sort-category.
Step 3: Creating filter and sort controls
Anywhere on your page where you'd like to add filtering and sorting controls, we'll add a Content controls div that contains two child divs in it: Filter block and Sort block. Separating these controls makes further styling a lot easier.
Now we'll take full advantage of Webflow CMS and create our filter buttons from the categories collection.
For that, we'll add a collection list inside the filters block and connect it to the categories collection.
Once it's been connected, add an embed code element inside any collection item in the list.
Inside the embed element, add the HTML for the filter button:
As you noticed, we'll be using the class name filter-button for further styling. We'll also use the class name w-button — this is Webflow's default style, which allows us to immediately see our elements in the Designer.
Now, using the great power of Webflow CMS, we can dynamically apply category names and data filter attributes:
Dmg mori ctx beta 2000wizardstree.
Now we need to add a button that lets site visitors reset their filters to show all content. Let's add this button inside the Content controls block and give it a class-name of filter-button.
Set the value for this>
The next part of the code will contain several blocks (2-6), but all of them will be inside one </strong>tag<br></p><h4>2. Convert any text into the CSS-friendly format<br></h4><p>var conv = function (str) {<br> if (!str) {<br> str = 'empty';<br> } return str.replace(/[!'#$%&'()*+,./:;<=>?@[]^`{|}~]/g, ')<br> .replace(/ /g, '-')<br> .toLowerCase()<br> .trim();<br> };<br></p><p><br></p><h4>3. Create dynamic filtering attributes from the 'filtering-categories' classes</h4><p>Because our filter-category element is sitting two levels deep inside the mix element, we'll be using two <strong>parentElement</strong> parameters. If your layout is different, adjust this parameter accordingly.<br></p><p><br></p><p>var catArray = document.querySelectorAll('.w-dyn-item .filter-category');<br> catArray.forEach( function(elem) {<br> var text = elem.innerText || elem.innerContent;<br> var className = conv(text);<br> elem.parentElement.parentElement.classList.add(className);<br> });<br></p><p><br></p>4. Create custom><br>
<br><h3 id='gallery-filter-portfolio-filter-for-gallery-element-dryer'>Gallery Filter Portfolio Filter For Gallery Element Dryer</h3><em>// 2) Reusable function to convert any string/text to css-friendly format</em><br> var conv = function (str) {<br> if (!str) {<br> str = 'empty';<br> } return str.replace(/[!'#$%&'()*+,./:;<=>?@[]^`{|}~]/g, ')<br> .replace(/ /g, '-')<br> .toLowerCase()<br> .trim();<br> }; <br><em>// 3) Creating dynamic elements classes from its categories for filtering:</em><br> var catArray = document.querySelectorAll('.w-dyn-item .filter-category');<br> catArray.forEach( function(elem) {<br> var text = elem.innerText || elem.innerContent;<br> var className = conv(text);<br> elem.parentElement.parentElement.classList.add(className);<br> });<br>// 4) Creating custom);<br> sortArray.forEach( function(sortElem) {<br><h3 id='gallery-filter-portfolio-filter-for-gallery-element-2018'>Gallery Filter Portfolio Filter For Gallery Element 2018</h3> var sortText = sortElem.innerText || sortElem.innerContent;
sortElem.parentElement.parentElement.setAttribute('data-date', sortText);
});
sortElem.parentElement.parentElement.setAttribute('data-date', sortText);
});
// 5) Set the reference to the container. Use the class-name of your Collection List or ID of the Collection List
var containerEl = document.querySelector('.posts-collection-list');
// 6) Call the MixitUp plugin
mixitup(containerEl);
And voilà — our dynamic blog filters are all set! The last thing we need to do is publish the website and test the result.
The Notable template I adapted to filter and sort dynamic posts on a CMS-powered blog with MixItUp is free to clone and use on the Webflow Showcase.
Gallery Filterportfolio Filter For Gallery Elements
Elastic Grid is a powerful, responsive, interactive, filterable jQuery & CSS3 image gallery plugin designed for portfolio websites. It allows your visitors to easily sort with many CSS3 effects. When visitors click on a thumbnail, it will open a preview and show a larger image and some other content like a title, a description and a link.
Basic Usage:
1. Include the latest jQuery javascript library and other necessary javascript files in the page.
2. Include the jQuery Elastic Grid plugin's javascript and CSS after jQuery library.
3. Create an empty container element for the PortfolioGallery.
4. Call the plugin with options on the element you just created, and set the image data following the structure:
Change log:
2017-06-02
- JS Update
2017-05-31
- fix filter position
2017-05-30
- fix offset top issue
2017-04-24
- Grid w/ youtube & vivimeo embeded
2017-02-08
- JS update
2017-01-04
- show title in images
This awesome jQuery plugin is developed by vukhanhtruong. For more Advanced Usages, please check the demo page or visit the official website.
Gallery Filter Portfolio Filter For Gallery Element Replacement
- Prev: Nice One Page Scrolling Effect with jQuery StackingSlides Plugin
- Next: Flexible & Responsive jQuery Grid Layout Plugin - Flexgrid