Wait, this is clever! I've been looking for a way to get rid of that nasty rack thing in my bathtub but still have a spot for shampoo bottles, soap, and the various detritus that you need for showering. I like this!
Create handy holders for glasses by drilling holes in a shelf. To cut circles up to 3 inches in diameter, use hole saw. Drill the center of each hole with a standard bit, and then switch to the hole saw. Drop in decorative glasses as holders for toothbrushes or other frequently used items. Simply pop the glasses out of the shelf and into the dishwasher.