Okay
  Public Ticket #1700060
Portfolio Filtering
Closed

Comments

  •  2
    NowAdvertising started the conversation

    Hi.

    In the standard portfolio page, you have a built-in feature that dynamically repopulates the portfolio content.

    I am in the process of creating my own custom filter menu for the content (for various reasons) which steps outside of the existing category menu, and I want to have the buttons I click perform the same function - causing the portfolio items to move around and appear / disappear.

    I have tried adding a # + the category slug to the page, which - whilst changing the URL correctly - does not update the content on the page.

    To resolve this temporarily, I have also forced a page reload on click, keeping the # + slug appended to the URL, which does work correctly (filtering the content appropriately when reloading the page) but of course this means the page misses out on the fun dynamic content animation etc.

    Would it be possible to point me in the direction of the function that the default category filtering buttons use to change the portfolio content on the fly, instead of reloading the page?

    Many thanks,

    Paul

  • [deleted] replied

    Hi Paul,

    Is it possible to give the page url that contains these button links so I can check the proper solution for you here and you don't miss the animation when clicking the buttons/links.

  •  2
    NowAdvertising replied

    Hi Arlind,

    Thanks for your response again.

    I'm just setting everything up to be viewable / editable on your end, in case you need to dig to find something.

    Much appreciated, back to you shortly.

    Paul

  •   NowAdvertising replied privately
  •   NowAdvertising replied privately
  • [deleted] replied

    Hi Paul,

    Thanks for your detailed explanation. I was checking on your backend and frontend the settings, so I realized that the script that filters portfolio items doesn't handle portfolio items, it only refreshes the page with category hashtag value, then on next refresh, our theme uses that #hashtag to filter out the categories, so the plugin does nothing to filter items! 

    I would recommend you to contact the plugin author of NOW Categories and describe the issue why their Widget with data-category attribute are not filtering the items, instead it refreshes the page because that should be handled by their plugin script.

    In other words, if those filters are different from our own:


    (view large version)

    It should be handled by the plugin author. We are open to work with other teams to make their plugins compatible with our theme.

  •  2
    NowAdvertising replied

    Hi Arlind,

    Sorry, I think there's been some misunderstanding here.

    I am the author of the NOW Category Filter plugin, I am developing it myself, and trying to work in tandem with the Kalium theme, exclusively for this website.

    What I was asking was if you could help me to understand where to find the functionality within the Kalium theme backend files that makes the default, existing Kalium category filter buttons trigger the dynamic, animated change in the portfolio items listed below.

    I want to take this functionality if possible and transplant it into my own plugin, so that I can make my own category filter buttons behave in the same way as the Kalium buttons.

    Perhaps I didn't explain well enough in my previous messages, but I believe I did describe the #hashtag / fragment in the URL + the reloading of the page in order to filter the page contents, however this is just how I have coded it until I can figure out how to apply the Kalium category filter functionality to my own in-development, custom plugin.

    Does this make sense? Please don't hesitate to explain if you think I am mistaken about how the original theme filter is supposed to work, or if I am not explaining myself well enough.

    Many thanks!

  •  2
    NowAdvertising replied

    Arlind,

    Just to illustrate further what it is I am having trouble with, I've attached a simple diagram showing which part of the process I am unsure of and what I'm trying to find / understand in order to utilise the existing functionality of the Kalium portfolio category filter buttons.

    Hope this is helpful in some way.

    Thanks.

  • [deleted] replied

    Hi Paul,

    The current process of Portfolio filtering is coded to work only with default filters that are currently implemented. We haven't foreseen to support multi taxonomy filters. We have plans to extend portfolio section with such features because it requires implementation of another code. Can you please use this form now until we release a totally renewed portfolio section, that will allow you to use custom filters, unless you want to code them with your own JavaScript.

    For your information, our theme uses Isotope library to filter items.

  •  2
    NowAdvertising replied

    Hi Arlind,

    Thanks for the reply.

    I am not actually using custom taxonomies, I am only using the default Portfolio Categories that are included in the theme, but I understand that you aren't able to help any further with this given the current implementation of the theme code.

    Many thanks for all your help.

    Paul

  • [deleted] replied

    Dear Paul,

    I told you that because depending on the current markup it is outside filters of theme native containers:

     
    (view large version)

    Our theme uses different container thats why the JavaScript is not executed:


    (view large version)

    This is the JavaScript that is used to filter the items:

    https://d.pr/f/4mcRmH

    I hope this makes sense for you.

  •  2
    NowAdvertising replied

    Great, thank you very much again.

    Paul

  • [deleted] replied

    I'd love to help you with anything here to make that filter functional and compatible.

  •  2
    NowAdvertising replied

    Thanks again Arlind. If I think of anything more you can help me with directly I will get back to you. You may hear from me again sometime this week.

    Thanks mate!