Refined post based leftnav function so uses objects and not string replaces