You are here

function views_plugin_display::render_more_link in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 plugins/views_plugin_display.inc \views_plugin_display::render_more_link()
  2. 7.3 plugins/views_plugin_display.inc \views_plugin_display::render_more_link()

Render the 'more' link

File

plugins/views_plugin_display.inc, line 1752
Contains the base display plugin.

Class

views_plugin_display
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

Code

function render_more_link() {
  if ($this
    ->use_more() && ($this
    ->use_more_always() || !isset($this->view->total_rows) || $this->view->total_rows > $this->view->pager['items_per_page'])) {
    $path = $this
      ->get_path();
    if ($path) {
      $path = $this->view
        ->get_url(NULL, $path);
      $url_options = array();
      if (!empty($this->view->exposed_raw_input)) {
        $url_options['query'] = $this->view->exposed_raw_input;
      }
      $theme = views_theme_functions('views_more', $this->view, $this->display);
      $path = check_url(url($path, $url_options));
      return theme($theme, $path, check_plain($this
        ->use_more_text()));
    }
  }
}