Detect where the current widget is getting drawn on.

In a widget, you can use
vars['entity']->context
vars['entity']->column
vars['entity']->order
to detect its location. This way you can show location specific content in your widget.