Bug 1031196 - Improve Display for Profile Details Page

This version of Profile Details page looks better.
As in the other PR, relying on the url is not a good idea. If you are wondering why, there is no guarantee that certain templates will always be accessed by the same urls. We may have other use cases which make templates available via different urls, so we should use data that we can control, such as the view context.  Please change this to be not dependent on a url.