1.0.3dev: Refactored `get_navigation_items` logic from [11824]. Refs #11512.


git-svn-id: http://trac.edgewall.org/intertrac/log:/branches/1.0-stable@13233 af82e41b-90c4-0310-8c96-b1721e28e2e2