Forum:Categories, Subcategories, and Sub-Subcategories?

I want to include Categories, Subcategories, and SubSubcategories into my template. Basically the user fills out the template and it will automatically add Tags to the page where appropriate using if statements.

Say for example the categories are Pets, Dogs, Retriever. If I am working on the Retriever page, I'd want Retriever to go into Dogs, and Dogs into Pets. This works:

I'm not sure how add the Subcategories or Subsubcategories though. Any help? Adam weiler 22:07, August 24, 2011 (UTC)
 * Put  into   and Dogs into Pets. I think this is what you're asking. –  Jä  zz  i  22:10, August 24, 2011 (UTC)