How does one keep anything out of the public schools? Pick any issue... Drug abuse, project DARE. Overeating, purging and dieting programs. Media bias, NY Times case studies. Racism, diversity programs. Local action, local control. States should provide competency testing for reading, writing and arithmetic so schools don't have time for nonsense. The problem is activist judges and the Constitution, gay marriage is just the latest issue.
I don't see how the other issues you list apply. schools don't advocate drug use or overeating.
even in NYC, the most liberal public schools around, gay textbooks were beaten back a few years ago. once gay marriage is legal, there will be no basis for stopping it anywhere.