Technology I Can’t Live Without

Wednesday, 18 July 2012

How to view result for Computing a field from a view


  // Views handles this page
  $view = views_get_view('view name');
  $view->set_display('default');
  $view->set_arguments(array($tid));
  $view->sort_form = $sort_form;
  // apply the 'Topics per page' setting from core Forum
  $view->display['default']->handler->options['items_per_page']=$forum_per_page;
  
$view->execute();

foreach($view->result as $row){
/**
* DO YOUR STUFF HERE  
*/
}


Posted by php at 00:25
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2012 (25)
    • ►  September (7)
    • ►  August (1)
    • ▼  July (17)
      • Add CSS File To Specific Pages In Drupal
      • Include CSS or Javascript file for specific node i...
      • How to view result for Computing a field from a view
      • Here is the list of 43 short tips you can use for ...
      • Securing PHP Files using HTTP Authentication
      • Add Pinterest "Pin It" Counter Button To Blogger
      • How to Add Twitter’s Official Tweet Button in Word...
      • How to Ajax auto refresh after x seconds
      • Node.js integration to Drupal.
      • Installing Node.js and NPM on Ubuntu/Debian
      • How to Install Node.js Essay Steps
      • 8 Practical PHP Regular Expressions
      • Cropping Images using PHP
      • how to debug meta tag in facebook
      • Test Credit Card Account Numbers
      • How to validate existing url using Curl
      • CREATE A PAGE TEMPLATE FOR ANYTHING YOU WANT
Ethereal theme. Powered by Blogger.