Add more link in a 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(----VIEW NAME----);
  3. $view->get_total_rows = true;
  4. $current_view = views_get_current_view();
  5. $view->set_arguments($current_view->args);
  6. $view->execute(----DISPLAY NAME----);
  7. if ($view->total_rows > $current_view->pager['items_per_page']){
  8. print(l(t('More'), 'downloads/pdf-brochure'));
  9. }
  10. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.