A caption in this weeks' latest installment of the Pfefferkörner kid detectives series uses the slang phrase von wegen. Directly translated ("from because of"?), this phrase makes very little sense. Used on its own (Von wegen!), it is a negation to a statement made by somebody else, and means "that is wrong," "not at all," "just the opposite," or just simply "no way!" The Duden dictionary defines von wegen! as auf keinen Fall! Despite some rather crude translations of the phrase on some less than dependable crowd-sourced translation sites, the phrase itself is not vulgar at all, and will only cause offense if the contradiction of a statement is inherently offensive to the person who made it. It's all about context.
It's a bit trickier to translate von wegen when it is used in a sentence and references something specific. Here too, we have to look at the context in which the phrase is used.
Von wegen [umgangssprachlich] Kunstunterricht.
It's not true about art class.
Caption 44, Die Pfefferkörner - CybermobbingPlay Caption
In the above scenario, a girl's parents just found out she was lying when she said that her brother was with friends in an art class. Her father confronts her about her lie using von wegen.
But von wegen can also be used in a dismissive sense:
Von wegen körperloser Sport,
So much for non-contact sports,
hätt' ich meinen Helm doch gebraucht.
I still could've made use of my helmet after all.
Caption 46, Ultimate Frisbee - Oli erklärt das SpielPlay Caption
The speaker above is talking about the fact that frisbee is generally considered to be a non-contact sport, so he is dismissing this belief as being untrue. And here again as an expression casting doubt on a supposition:
Von wegen Öl geht aus. Die lügen doch, die Ölstaaten.
As if the oil will run out. But they're lying, the oil states.
Caption 29, Culcha Candela - Schöne neue WeltPlay Caption
There is also, of course, a standard, non-slang use of the phrase von wegen in a sentence: von [genitive noun] wegen means "for [noun] reasons" or "for reasons of [noun]." Some examples: von Amts wegen (for official reasons), von Rechts wegen (for legal reasons), or von Berufs wegen (for professional reasons).