Reputation: 121
I'm going to create a simplenews newsletter for my site and I'm going to edit its template.
In this template I can insert a view to display the latest news of my site.
The view is correctly embed into my newsletter with this code:
$view = views_get_view('latest_news_newsletter');
$view->set_arguments(array('mycontextualfilter'));
print $view->preview('news_newsletter');
$view->destroy();
Everything is ok but I can't customize the results of my view, I can modify the templates of my fields and I see a good preview but when I embed this view in the email template I don't know which theme it uses, in other words I embed a "raw" view.
Is there a function to force the theme of the view that I'm going to embed?
Upvotes: 0
Views: 39
Reputation: 2173
Have you tried to use embed view function ? : https://api.drupal.org/api/views/views.module/function/views_embed_view/7.x-3.x
Upvotes: 1