Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hanamizuki/4378326 to your computer and use it in GitHub Desktop.
Save hanamizuki/4378326 to your computer and use it in GitHub Desktop.
It is currently not working
// Contest listing
$view_modes = array('grid', 'teaser');
foreach ($view_modes as $view_mode) {
$view = &${'contest_'.$view_mode};
$display = &${'display_contest_'.$view_mode};
$view = views_get_view('contest_listings');
$display = $view->display[$sort];
$display->display_options['row_options']['view_mode'] = $view_mode;
$listing[$view_mode] = $view->preview($sort, array($tid));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment