I have a setup like the following:
Products
- Category 1
- Item 1
- Item 2
- Item 3
- Category 2
- Category 3
And so on. The "item" pages have a TV named "product_featured" which is either 1 or 0. On the main products page I use this call to try and pull the featured products:
[!Ditto? &startID=`4` &depth=`2` &summarize=`100` &tpl=`ProductHTML` &hideFolders=`1` &hiddenTVs=`tvproduct_featured` &filter=`tvproduct_featured, 1, 2`!]
The issue is that Ditto fails to properly filter out pages that lack the TV "product_featured" in them. Since the filter is an explicit request for an equals, the intuitive behavior would be for it to ditch all results that did not meet the requirements. I don’t know if this is a bug or a feature, or if I’m just doing something wrong, but it keeps returning all of the Category pages as results, which it shouldn’t.
The &hiddenFolders=`1` should take care of that yes, but the problem with that is that there is no guarantee that they won’t create a (temporarily) blank Category as a placeholder for upcoming content. In that case it is not listed as a folder, and it will suddenly show up as a broken featured product. I know that the user can forcibly call it a folder in the document properties, but these people aren’t going to do that. They are very low-level users and need to have everything work as seamlessly as possible.
What do I do? I’m running Ditto 1.1 beta 2 if that makes a difference.