Adds db integration to all pages