If you're struggling with students getting into sidebar or off-topic conversations during your lesson, you may try teaching them this phrase that has worked for me: "between the prayers".
The concept is that once we've said the opening prayer, our time has been consecrated for the worship of God. We focus on the lesson at hand "between the prayers" because that time is set apart for a certain purpose. Cell phone use is lesson-related. Conversations focus on gospel principles, especially those that relate to the lesson. Between the prayers, classes are single-minded and focused on the Lord. Before the opening or after the closing prayer, any appropriate conversation or activity goes. Students are naturally more quiet and subdued after a prayer, so use that to your advantage to immediately begin the spiritual portion of a lesson.
In order to make this concept work, teachers should use the prayer as a transition to the spiritual part of a lesson. Avoid saying a prayer and then moving into a "how was your weekend" type conversation. Do all activities that might get a little silly, like devotional or get-to-know-you type activities, before the opening prayer. When the activity is finished, you might say something like, "Now, let's pray to invite the Spirit into the spiritual part of our lesson." or "Okay, we are moving to the spiritual part of our lesson, so let's ask the Lord to help us feel the Spirit with an opening prayer."
If a student wants to show the class a non-lesson related photo or video during class, ask him or her to hold it until after the prayer, and then make time for the student to share because "...between the prayers, we are focused on the lesson". If students are talking out of turn, explain that you want students to visit, but the time between the prayers was consecrated for worship when we said our opening prayer, and that they should hold that conversation until after the closing prayer.
It will take a few reminders for students to learn to focus on gospel topics between the prayers, but I've found this simple notion to be very useful in helping students focus on the things I'm trying to help them discover.