Confusing D7 Views 3 "date last updated display need

1 reply [Last post]
roborracle
Offline
Last seen: 49 weeks 2 days ago
Joined: 2017-07-24

Hello everyone - I've got an intriguing issue. I've got a page (basic page content type) that holds the display of an introductory piece of content that is followed by a quicktabs display of blocks in an accordion.

I think I've figured out how to display the date last updated for the content type/page node itself. HOwever, most updates are going to occur in teh blocks displayed in teh quicktabs instance. Can you help me figure out how I can check for when the BLOCK was last updated and display that?

Here is the output of my view as it stands:

$view = new view();
$view->name = 'medicare_date_updated_block';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Medicare Date Updated Block';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially <em>/

/</em> Display: Master <em>/
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = '1';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/</em> Relationship: Content: Taxonomy terms on node <em>/
$handler->display->display_options['relationships']['term_node_tid']['id'] = 'term_node_tid';
$handler->display->display_options['relationships']['term_node_tid']['table'] = 'node';
$handler->display->display_options['relationships']['term_node_tid']['field'] = 'term_node_tid';
$handler->display->display_options['relationships']['term_node_tid']['vocabularies'] = array(
  'user_groups' => 'user_groups',
  'calendar_entry_types' => 0,
  'chp_health_centers_locations' => 0,
  'facility_type' => 0,
  'faq_categories' => 0,
  'form_categories' => 0,
  'form_section_name' => 0,
  'hospitals' => 0,
  'languages' => 0,
  'medicare' => 0,
  'news_categories' => 0,
  'pharmacy_feature' => 0,
  'pharmacy_type' => 0,
  'provider_directory' => 0,
  'provider_specialties' => 0,
  'tags' => 0,
);
/</em> Field: Content: Updated date <em>/
$handler->display->display_options['fields']['changed']['id'] = 'changed';
$handler->display->display_options['fields']['changed']['table'] = 'node';
$handler->display->display_options['fields']['changed']['field'] = 'changed';
$handler->display->display_options['fields']['changed']['label'] = 'Last updated';
$handler->display->display_options['fields']['changed']['date_format'] = 'custom';
$handler->display->display_options['fields']['changed']['custom_date_format'] = 'l, F j Y';
$handler->display->display_options['fields']['changed']['second_date_format'] = 'long';
/</em> Sort criterion: Content: Post date <em>/
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/</em> Contextual filter: Content: Has taxonomy term ID <em>/
$handler->display->display_options['arguments']['tid']['id'] = 'tid';
$handler->display->display_options['arguments']['tid']['table'] = 'taxonomy_index';
$handler->display->display_options['arguments']['tid']['field'] = 'tid';
$handler->display->display_options['arguments']['tid']['default_action'] = 'default';
$handler->display->display_options['arguments']['tid']['default_argument_type'] = 'raw';
$handler->display->display_options['arguments']['tid']['default_argument_options']['index'] = '0';
$handler->display->display_options['arguments']['tid']['default_argument_options']['use_alias'] = TRUE;
$handler->display->display_options['arguments']['tid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['tid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['tid']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['arguments']['tid']['specify_validation'] = TRUE;
$handler->display->display_options['arguments']['tid']['validate']['type'] = 'taxonomy_term';
$handler->display->display_options['arguments']['tid']['validate_options']['vocabularies'] = array(
  'user_groups' => 'user_groups',
);
$handler->display->display_options['arguments']['tid']['validate_options']['type'] = 'convert';
$handler->display->display_options['arguments']['tid']['validate_options']['transform'] = TRUE;
$handler->display->display_options['arguments']['tid']['validate']['fail'] = 'empty';
/</em> Contextual filter: Content: Updated date <em>/
$handler->display->display_options['arguments']['changed_fulldate']['id'] = 'changed_fulldate';
$handler->display->display_options['arguments']['changed_fulldate']['table'] = 'node';
$handler->display->display_options['arguments']['changed_fulldate']['field'] = 'changed_fulldate';
$handler->display->display_options['arguments']['changed_fulldate']['default_action'] = 'default';
$handler->display->display_options['arguments']['changed_fulldate']['default_argument_type'] = 'node_changed';
$handler->display->display_options['arguments']['changed_fulldate']['default_argument_skip_url'] = TRUE;
$handler->display->display_options['arguments']['changed_fulldate']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['changed_fulldate']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['changed_fulldate']['summary_options']['items_per_page'] = '25';
/</em> Filter criterion: Content: Published <em>/
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;

/</em> Display: Block */

$handler = $view->new_display('block', 'Block', 'block_1');
$handler->display->display_options['block_description'] = 'Medicare Date Updated';

specbee
Offline
Last seen: 47 weeks 2 days ago
Joined: 2018-03-19
Hi,This is not straight

Hi,

This is not straight forward. You have to handle this custom.

Implement block admin configure form alter and try to save the date timestamp in a custom table on block update.

Also, you can check on this module - Block Revisions (https://www.drupal.org/project/block_revisions)

Add to playlist

Add to , or

Add to new playlist:

Add to playlist
This is a member-only feature
But, it's easy to become a member

Add to cart:


Loading...
Contact us

Below are the supported keyboard shortcuts for our video player.

space
Start / stop video
shift
Go to next video
shift
Go to previous video
Increase or decrease player speed by 20%
Skip ahead or go back by 15 seconds
1...9
Jump to a percentage (2 is 20%, for example)
f
Toggle full screen
Videos Pricing More Search
BuildAModule Logo Icon BuildAModule Logo Icon
Become a member!
$29
1 month
$156
6 months
10% off
$276
12 months
20% off
All memberships come with the following:
24 / 7 access to the entire 1800+ video library
An innovative video player with a rolling transcript
Extensive Drupal and cross-platform training
A thorough and thoughtful training style
Progress tracking
Take notes on specific video sections
Intuitive multi-user management
How many users?
user
Go solo with a single user, or give multiple team members access through one account and get discounts by bundling multiple users into a single membership.