Template:Succession

Usage
Produces:

The "category" parameter can be a title or a link to a page.