Monday, April 19, 2010

Drupal Front Page with multiple views content

I have posted one topic regarding how to load the multiple views in to single page ie:page-front.tpl.php .
In this example you have to create view name Mobile_applications and with in this view you have to create two page views those ids page_1 and page_2.

Now you can call those views using the fallowing code in page.tpl.php
//This is used to display the view in a page
$viewName = 'Mobile_applications';
$output = views_embed_view($viewName,'page_1');
echo "

Applications for your phone

";
print $output;

$output1 = views_embed_view($viewName,'page_2');
echo "

Top rated

";
print $output1;

?>