If your layers are sliding you need to adjust your technique - such as using a firmer frosting (like a thick buttercream) as an inside ring between the layers... to glue the layers together and to create a sort of kiddie pool for the filling - especially if its slippery, like a jam or pudding.