jumping through and on a platforms(2d)

So I'm playing around with a 2d game today..I'm still a beginner. Anyway, I want this character to jump on a platform on top of him, but I want the platform to only collide with him when he's on top of it and not when he's jumping through the platform.. An example would be the square backgrounds in this mario game: link text

I can probably think of one way to do it, but it kinda feels like a hack, and I wanted to get other people's opinion on it. Thanks!

In your modeling program, copy the platform mesh. Remove all faces that aren't part of the platform's "standable area". Use this new object as the collision mesh instead of using the platform. Unity performs "backface culling" on collision meshes as well as visible meshes, so it's possible to move through walls that face away from the movement direction.