Template:GetPestsCatW
The template is part of the Template:PestListB and is equivalent to Template:GetBeneficialCatW. It takes the pagename of a pest and tests if the name is assigned one of the following 10 higher categories:
- Eudicotyledons - Asterales
- Eudicotyledons - Brassicales
- Eudicotyledons - Caryophyllales
- Eudicotyledons - Solanales
- Eudicotyledons - Fabales
- Eudicotyledons - Malvales
- Eudicotyledons (other families)
- Monocotyledons
- Pteridophytes
- other weeds
If yes, it adds the above number of the category found to the pagename, e.g. for "Abutilon theophrasti (weed)" it returns "6,Abutilon theophrasti (weed)". If no category is found it adds the number "99" to the pagename.
The template uses the query
{{#ask:[[Category:<higher category>]][[<pest pagename>]]|format=count}}
to test an assignment. It can cause unexpected results if the pest is assigned to several categories. To avoid such problems beneficials and pests/diseases/weeds should not be assigned to several categories unless they have the same higher groups.
The equivalent templates for pests and diseases are Template:GetPestsCatP and Template:GetPestsCatD.