Resultados de una view


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. $view = views_get_view('Propiedades');
  3. $view->set_arguments(array($row->nid)); // optional
  4. $view->set_display('block_2');
  5. $view->pre_execute();
  6. $view->execute();
  7. $count = count($view->result);
  8. $viviendas= format_plural($count, '1 vivienda', '@count viviendas');
  9. if ($count>=1) { ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.