There isn't a standardized plugin for doing this. I've looked more than once. However, there are a number of options. See from my earlier question on the same topic:
What are the options for storing hierarchical data in a relational database?
In short, if you're using a table with ID and ParentID (a.k.a. adjacency list) you use Common Table Expressions with most databases (Oracle's CONNECT BY being one of the most notable exceptions). OTO, something like materialized path or nested sets may be a better fit for your situation - for instance ability to easily find "lineage" where with adjacency list this is an expensive operation.
Usually what ends up happening with a system that needs to work extensively with hierarchical data, for instance a CMS, is that it implements more than one of these solutions. The assumption is reads heavily outweigh writes.