Programmatically fetch views header created with help of "Table with aggregation options"

by jas   Last Updated January 12, 2018 08:07 AM

I have view which our puts like below :

46915 // this row is total

Pontus (4031)

Martin (3990)

Stigels (3737)

.... (2002)

......(4532)

...so on list goes (999) etc

actual output:

enter image description here

I have displayed it programmatically

$view = views_get_view($view_name);
$view->set_display($view_display);
$title_fourth_column = $view->get_title();
$list_fourth_column = $view->preview($view_display);

On var_dump it gives without header :

array (size=281)
  0 => 
    object(stdClass)[1640]
      public 'users_status' => string '1' (length=1)
      public 'users_name' => string 'Pontus' (length=16)
      public 'uid' => string '682' (length=3)
      public 'node_users_nid' => string '4031' (length=4)
  1 => 
    object(stdClass)[1642]
      public 'users_status' => string '1' (length=1)
      public 'users_name' => string 'Martin' (length=15)
      public 'uid' => string '12' (length=2)
      public 'node_users_nid' => string '3990' (length=4)
  2 => 
    object(stdClass)[1643]
      public 'users_status' => string '1' (length=1)
      public 'users_name' => string 'Stigels' (length=13)
      public 'uid' => string '1008' (length=4)
      public 'node_users_nid' => string '3737' (length=4)
  3 => 

Using module for creating total at top of row: https://www.drupal.org/project/views_aggregator

enter image description here

Is there some way programatically I can fetch only value in th of table ie: 46915 Thanks!

Tags : 7 views


Related Questions


Alter the moderation state in the Content view Drupal 8

Updated February 28, 2018 21:07 PM


Group items in Views by value in Field Collection

Updated July 20, 2015 13:03 PM

List of referenced entities appended to a node

Updated January 12, 2017 08:03 AM