Drupal 6 views_embed_view ignores content filtering?
may be someone encountered a similar issue.开发者_如何学Python I output a view on the front page of my D6 site using this code:
<?php print views_embed_view("frontpage_news_list", "default" ); ?>
Yet it seems that this way of outputting the view bypasses content filtering for the teaser field (NOT the view filter, but filters applied to the teaser of the node). I see this because I don't output img's in my teasers, and they are not shown when I check preview in the Views UI, yet on the front page the images are shown in this view.
I have another view, with outputs the nodes of the same type in a "Page" output, and the img's are hidden in the teasers there, as required.
Has anyone encountered a similar issue before? I would appreciate any help with this.
<?php
// you can use block_1, ... blocn_n or page_1,...,page_n as display id
print views_embed_view("frontpage_news_list", "block_1" );
// or this way to show view
$view = views_get_viev(YOU_VIEW_MACHINE_NAME);
$view->set_display($display_id);
// $view->set_exposed_input(array('var' => $myvar)); // to set exposed filters
// $view->set_arguments(array(....)); // to set arguments. rtfm ;)
$view->set_items_per_page(0);
$view->execute();
$result = $view->preview();
print $result;
?>
This was a problem with the HTMLawed module, not with the Views. It has been solved by the developer now, so no issue anymore. Thanks for the help, guys!
精彩评论