Case: You have made a views block and want to insert it manually somewhere in your template files.

Why: You are now in complete control of where the block is inserted I your HTML

Solution: I always search like craze in old projects for the peace of code for this. It is pretty simple, of course when you know what to do. The code go a follows:

<?php
print views_embed_view('name_of_view', 'name_of_block');
?>

An example could be:

<?php
print views_embed_view('latest_products', 'block_1');
?>

Drupal version: 
Drupal 6.x

Far & SønBirk Centerpark 407400 Herning +45 29 90 21 29

Vi støtter