Fetch a view into hook_preprcess_node and then put it in a block I want to fetch a view in my template_preprocess_node function and then put in in a block, so I can diplay it in the sidebars of my page. I have the view (the code below) but don't know how to put it in a block. Thank you for your help in advance!

    $view = views_get_view('playlist');
    $view-&gt;set_display('block');
    $view-&gt;set_arguments(array($course));
    $view-&gt;pre_execute();
    $view-&gt;execute();
    $variables['content']['playlist'] = $view-&gt;render();
If you want to draw a view of content based on a node, then you should build a module that declared hook_block(), and that hook_block gets the current node with menu_get_object(), and form the desired view.

At the theming layer, when your node is preprocessed for theming, it's not a good place to construct any blocks. Hope this helps.