Convert slashes to dashes when creating an id to cache the view from. This also allows ids to be used for compiling views.