My hands are hanging by my side.
I'm standing staight and tall.
My eyes are looking straight ahead.
I'm ready for the hall!
I say this after the students have formed their initial line inside the classroom and are waiting for me to move into the hallway. I also demonstrate as I say each part. It's amazing how the students will follow along with the actions and fall right in line. It's been the miracle cure for me.
All they ever need for a reminder in the hallway is me mouthing the word "hands" or "eyes" and they quietly walk down the hall. Occasionally when the lines become messy, I stop the class and ask them to do a hair stare. They quickly figure out that this means they are to make sure they can stare at the hair in front of them and it straightens the line right out!
With preschool and kindergarteners I also have a game while we are waiting in line in the hallway (for our turn to go into a special or lunch). In a whisper, I sing: "Do what I do, can you do what I do. Do what I do, do it right now." I don't know how to explain the rhythm of the song, but while I'm singing that over and over I do different motions with my hands that they have to copy.
The hallway poem I use with preK thru 2nd grade is not appreciated by 3rd grade and up. With older students I just tell them what kind of behavior I expect in the hallway. I keep track of the time that I have to stop to remind them to shape up. That time is then taken off of fun time at the end of the day.
I sometimes pick a "Mystery Student" from their sticks. I don't tell them who I picked and if this mystery student does a good job, they get 2 or 3 minutes to extra Friday recess. It actually works pretty good. Also, you could bring out vocabulary or math flashcards. Go down the line and show them a card. I call it Ticket in the Door (classroom door) and they love it!
For the very young, K, 1, 2, sometimes I tell them to pretend they have marshmallows in their mouths and they can't talk, then puff out my cheeks as an example. The little kids will copy this usually. Older kids I just remind them of line behavior, remind them they'll be walking past other classrooms, etc. I don't make too big a deal of line behavior as long as it's in control. Other teachers just love to comment to the students if their behavior isn't perfect, "You know you wouldn't be walking like this if your teacher was here." I think it's impossible for teachers to not comment on a sub's line. Boy...I hope it isn't just me!