scaffolding for detail vs class view swapping