0

Im using views to display content ,, How can i show block only in the first page in the views and im enable the ajax in the views..

I tried with PHP in the Block visibility but I dont know how to get the first page in the views... Portfolio = the views name

<?php
  $url = request_uri();
  $pos = strpos($url, "page");
  if ($pos === false && arg(0) =='portfolio') {
    return TRUE;
   }

?>
Kai
  • 38,985
  • 14
  • 88
  • 103
Woody
  • 23
  • 1
  • 1
  • 4

1 Answers1

0

you should have different page files for your pages, like "node--product_page.tpl.php" you can add your view block inside your page, whenever you want using this code:

<?php echo views_embed_view('YourViewName[ex:product_list]', $display_id ='yourBlockViewName[ex:block_1]'); ?>
simin
  • 29
  • 7