Git Product home page Git Product logo

statamic-taxonomy-and-or-logic's Introduction

Demo of AND and OR logic when working with Taxonomies in Statamic 3

Statamic 3.0+

Sometimes you need greater flexibility and control when filtering a collection based on a taxonomy (or even multiple taxonomies).

Within your own tag, it is easy to build your own query using Statamic's EntryQueryBuilder that can perform different query logic (AND or OR) on your taxonomies to determine whether your filters become stricter (AND) or broader (OR).

For more information, check out my filtering entries by Taxonomy in Statamic 3 using AND or OR logic.

Run the demo

If you're reading this, you're probably already in the Statamic and/or Laravel way of thinking, so this should be straight forward.

  1. Clone the repo, and configure your server as you normally would
  2. Create and configure your .env as necessary
  3. Run composer install
  4. Run npm install
  5. Build the assets with npm run production
  6. If you want to log in to the Control Panel, make yourself a user with php please make:user

License

This addon is licensed under the MIT license.

statamic-taxonomy-and-or-logic's People

Contributors

martyf avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.