makeTitle function

Given the DocObject context, returns a "pretty" name that is used in the sidebar and the page header.