text: Q:
  
  Insert a view with a context using php?
  
  I know I can insert a view using the following code:   
   <?php
      $view = views_get_view('VIEWNAME');
      print $view->preview('default');
   ?>
  
  In my view I have a contextual filter of user: name 
  When I insert this view using the Display Suite module I have this option from Display Suite:
  
  I was wondering if there is a way to pass this context to the view, like Display Suite does, using php code only. 
  
  A:
  
  You can set the default value for the contextual filter through URL and then in your code use $view->set_arguments() to pass the argument.
  
  