DrupalBin
Submit Code
About
Recent Posts
float?
2 hours 47 min
ago
views handler
6 hours 18 min
ago
Code
6 hours 33 min
ago
Code
6 hours 35 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Fix for theme_view()
View
Download
Fix
This fix will not be saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Source code:
*
/** * Returns a themed view. * @param $view_name * The name of the view. * @param $limit * Maximum number of nodes displayed on one page. if $limit is set and $use_pager is * not, this will be the maximum number of records returned. This is ignored * if using a view set to return a random result. * If NULL, the setting defined for the $view will be used. * @param $use_pager * If set, use a pager. Set this to the pager id you want it to use if you * plan on using multiple pagers on a page. Note that the pager element id * will be decremented in order to have the IDs start at 0. * If NULL, the setting defined for the $view will be used. * @param $type * 'page' -- Produce output as a page, sent through theme. * The only real difference between this and block is that * a page uses drupal_set_title to change the page title. * 'block' -- Produce output as a block, sent through theme. * 'embed' -- Use this if you want to embed a view onto another page, * and don't want any block or page specific things to happen to it. * @param $view_args * An array containing the arguments for the view */ function theme_view($view_name, $limit = NULL, $use_pager = NULL, $type = 'embed', $view_args = array()) { if ($view = views_get_view($view_name)) { $use_pager = isset($use_pager) ? $use_pager : $view->use_pager; $limit_default = ($type == 'block') ? $view->nodes_per_block : $view->nodes_per_page; $limit = isset($limit) ? $limit : $limit_default; return views_build_view($type, $view, $view_args, $use_pager, $limit); } } theme('view', $view_name, $limit = NULL, $use_pager = NULL, $type = 'embed', $view_args = array())
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal
Drupal 5
Drupal 6
HTML
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.