Template:GetPestsCatD

From Pestinfo-Wiki
Jump to: navigation, search

The template is part of the Template:PestListB and is equivalent to Template:GetBeneficialCatA. It takes the pagename of a disease and tests if the name is assigned one of the following 10 higher categories:

  1. Bacteria
  2. Ascomycota - Dothideomycetes
  3. Ascomycota - Leotiomycetes
  4. Ascomycota - Sordariomycetes
  5. Ascomycota (other orders)
  6. Basidiomycota
  7. Other fungi
  8. Plant parasitic nematodes
  9. Plant viruses
  10. Other plant diseases

If yes, it adds the above number of the category found to the pagename, e.g. for "Cryphonectria parasitica" it returns "5,Cryphonectria parasitica". 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:GetPestsCatW.