I have a doggie door that fits into the slider. Then we have one built into the lanai. We can put a sliding panel into either one so the dogs cannot go in or out.
I think it is one of the best inventions in the world. We have 4 dogs that are not all in sync for bathroom times.
I leave it open when I'm gone during the day. My neighbors come and go, so someone is usually home and if one of the dogs barks too much, they know all by name, they tell them to go into the house and they do.
It's nice to know that they don't have to hold it if they need to go out, so if I'm running a bit behind, no one is home with thier legs crossed.