Put a section of an article into a category on Wikipedia

wikipedia

I'd like to place sections of articles into categories on Wikipedia. (for example, placing "Pollution in India#Water pollution" into the category "Water pollution in India") Is there any way to do this besides creating a redirect page for the article and then putting the redirect page in the category?

Best Answer

First, let me say that I don't think doing this is a good idea. Category description pages on Wikipedia shouldn't contain article text, that's not what they're for. If you want to do this, make sure there is a consensus to do it. For some more information, see Creating category pages.

If you're sure you want to do this, I think the only way (ignoring custom or some existing extension) is to use template transclusion. This can be done two ways:

If you know that you'll always want only this specific section, you can enclose it in <onlyinclude> tag. Then you can transclude the article to the category page (e.g. {{:Pollution in India}}) and only this section will show up.

But if you want to transclude different sections of the same article to different categories, that won't work (unless you also added some {{#if}}s to the article, which I don't think is a good idea). What you can do then is to split the article into multiple parts, each within its own template. So, the text of the section Water pollution might be in Template:Pollution in India/Water. Then you can transclude that template to both the article and the category (using {{Pollution in India/Water}}).