when you say the top has come apart, do you mean the sliding lid or the decorative insert which sits on the lid?
as the ashtray lids is made from 2 parts, the piece which sits on the ball bearing runners, and the decorative top (probably wood effect)
the insert slides onto the actually runner part, but the runner part shouldn't come away, best bet is to remove the whole ashtray and take a look. if you remove the insert (pull toward the back of the car) you'll find a T25 screw undo this, slide the ashtray back and then lift you, the lighter / 12v is connected on the rear, so disconnect this as you remove it.
once you've got the whole unit out it should make more sense.