Embedding Views and passing filters to exposed filters in Drupal

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.


    $view3 = views_get_view('SportsFeed');
    $filters = views_get_filter_values(array('filter0' => arg(2)));
    $scroll_str = (views_build_view('embed', $view3, array(), false, 0, 0, 0, $filters));

$remove = array("<li>",'<ul id="view-sportsfeed">',"\n");
$strrss = str_replace($remove,"",$scroll_str);
$remove = array("</li>", "</ul>");
$strrss = str_replace($remove," <font color='red'>|</font> ",$strrss);

                                     

Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.