Getting variable from Snippet

Have a look at this post: Undefined variable in snippet