Template:FULLCHAPTERNAME

Returns the full name of a chapter or the book name if it isn't a chapter.