Forum:CategoryTree filtered by two categories?

Is it possible to create a CategoryTree that is filtered by two different categories? Such as if there were the categories 'Food' and 'Red', if I could create a CategoryTree that would list pages under both categories, essentially listing all Red Foods. An odd example, but it's what I'm stuck on.

Nerdstick 23:15, February 4, 2012 (UTC)


 * Try using the  tags (DPLforum) like this:

 namespace=main category=Category1 category=Category2 mode=list addlastedit=false addcreationdate=false addlasteditor=false count=50
 * See MediaWikiWiki:Extension:DPLforum for more info. Not totally positive if categories should be separated by comma or space, but you can experiment. -- Fandyllic (talk &middot; contr) 8 Feb 2012 5:18 PM Pacific


 * I had some wrong stuff for the category parameters, but Sovq fixed it. Hopefully it works. -- Fandyllic (talk &middot; contr) 10 Feb 2012 12:57 PM Pacific
 * Of course you can do it the hard way like Fandyllic shows, or simply add the category food to red food category to make the food be the top category, the red food being the subcategory (which will also show up like that in the food category).
 * If you happen to have alt sub level categories (like red fruit from tree and red fruit from bushes) simply add the red fruit category to the red fruit from tree as well as the red fruit from bushes category to make it automatically show up as selectable sub categories.


 * On a sidenote: if you want to display that entire content as a categorial tree (or colladogram) in a single page : example 1, example 2, then you will need some extended templates, which i will be happy to help you with.


 * I believe Nerdstick wants to list all articles being in both categories. I don't see adding one category to another achieving that goal. — Sovq 07:20, February 11, 2012 (UTC)


 * DPL is your only choice then. It's an extension that is not enabled by default. It must be requested by contacting Wikia. DPLForum (mentioned above) would also do what you want, but probably not in the way you want it done. If you decide to enable DPL where you are needing this done, contact me here or personally and I will help you get to a solution using DPL. Rappy 07:24, February 11, 2012 (UTC)


 * Sovq, the categories are being displayed on a single category page if you have a top and sub category. But i think Nerdstick should expand his question or comment on the answers given if it provides what he was looking for.

Even though the DPLforum extension is very limited in comparison to DPL, it can do what OP is asking for. I took the liberty of adjusting and testing the above code earlier and I definitely wouldn't call it "the hard way". I believe that Nerdstick is pretty clear on what the final result should be: "...essentially listing all Red Foods..." - this can't be achieved by adding categories to categories. — Sovq 11:45, February 11, 2012 (UTC)