We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50574
    • 70 Posts
    Hello

    I currently have 3 checkbox TVs that pretty much do the same job, they are a list of product varieties (vegetarian, low calorie etc). Two of the TVs are available on the product resource with one TV populating a <ul> using inputs such as vegetarian=<li>Vegetarian</li>. The second adds the category name to an item which can then be filtered using isotope.js with the TV using inputs like vegetarian=vegetarian etc. The third is on a specific category (i.e. Vegetarian) resource where you have to select all the products that are in fact related to that category.

    It'd be great to combine all these TVs somehow but I'm not sure how to do it. It'd be preferable if there was one checkbox list on the product resources that could populate both the <ul> and filter list and then on the category resource it could look up the results of this TV and then add the products that had the corresponding category to the page automatically.

    Any thoughts?
      • 47401
      • 295 Posts
      ive done this in a similar way, with a list of lets say authors, and each page you can then select an indervidual author. in this instance you want a category, sub category
        • 50574
        • 70 Posts
        After a few hours of thought on it last night I think I'd been blinded by snippets and output modifiers etc and was making it much more difficult than it had to be. There was a very simple answer and that was good old getResources. Adding a getResources call to each of the category pages I then used &tvFilters=`productFilters==%vegetarian%` within it to only show products that had the 'vegetarian' checkbox ticked and so on for all the other category options.

        I've not quite figured out how to get the filter TV to also populate the <ul> yet but I'm working on it.