We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22673
    • 72 Posts
    I have a list of news articles, all as resources, and want to be able to categorise them. This is so I can pull out certain news articles on certain pages.

    To categorise them I have used a checkbox TV with 5 options, these are the categories. The problem is that the checkbox TV outputs an array eg: [option1,option2,option3] which is dependant on which checkboxes are selected..

    So how do I use getResources to pull out news articles from only 1 category? I'm not sure how to write the &tvFilters or &where parameter so it does this.

    It needs to be: Find resources WHERE checkboxTV CONTAINS option1

    Any help would be much appreciated! [ed. note: paramaniac last edited this post 14 years, 8 months ago.]
      • 22673
      • 72 Posts
      Well as soon as I posted this, I found the solutions in the getResources docs!

      &tvFilters

      If you want, you can also use the percentage sign (%) as a wildcard. For example:

      mytv==%a%

      Matches any resources that has an "a" in the mytv value.