Well, first that's cage is too small for one pig (Don't know how many you have) So you may need to change your design.
Edit: Also for that top layer, you are going to need to make a bent grid ramp or something that has sides, and also have some way to block off the other parts of the top so they can't fall off