Next revision
|
Previous revision
|
reloaded:views_frontpage3 [2017/06/23 13:57] giancarlo created |
reloaded:views_frontpage3 [2017/06/23 14:00] giancarlo |
{{ :reloaded:fp_count_date.png?nolink&400 |}} | {{ :reloaded:fp_count_date.png?nolink&400 |}} |
| |
| \\ |
| Really faster than Islandora Collection Object Count Listing. |
\\ | \\ |
Enable Views block only on frontpage. | Enable Views block only on frontpage. |
<WRAP prewrap center> | <WRAP prewrap center> |
<code> | <code> |
| $view = new view(); |
| $view->name = 'front_lastupdate_date'; |
| $view->description = ''; |
| $view->tag = 'default'; |
| $view->base_table = 'islandora_solr'; |
| $view->human_name = 'Front_lastUpdate_date'; |
| $view->core = 7; |
| $view->api_version = '3.0'; |
| $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
| |
| /* Display: Master */ |
| $handler = $view->new_display('default', 'Master', 'default'); |
| $handler->display->display_options['title'] = '<none>'; |
| $handler->display->display_options['use_more_always'] = FALSE; |
| $handler->display->display_options['access']['type'] = 'none'; |
| $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'; |
| $handler->display->display_options['row_options']['default_field_elements'] = FALSE; |
| /* Header: Global: Result summary */ |
| $handler->display->display_options['header']['result']['id'] = 'result'; |
| $handler->display->display_options['header']['result']['table'] = 'views'; |
| $handler->display->display_options['header']['result']['field'] = 'result'; |
| $handler->display->display_options['header']['result']['label'] = 'count'; |
| $handler->display->display_options['header']['result']['content'] = 'Repository contains @total objects'; |
| /* Field: Islandora Solr: fgs_lastModifiedDate_dt */ |
| $handler->display->display_options['fields']['fgs_lastModifiedDate_dt']['id'] = 'fgs_lastModifiedDate_dt'; |
| $handler->display->display_options['fields']['fgs_lastModifiedDate_dt']['table'] = 'islandora_solr'; |
| $handler->display->display_options['fields']['fgs_lastModifiedDate_dt']['field'] = 'fgs_lastModifiedDate_dt'; |
| $handler->display->display_options['fields']['fgs_lastModifiedDate_dt']['label'] = ''; |
| $handler->display->display_options['fields']['fgs_lastModifiedDate_dt']['alter']['alter_text'] = TRUE; |
| $handler->display->display_options['fields']['fgs_lastModifiedDate_dt']['alter']['text'] = 'Last update: [fgs_lastModifiedDate_dt]'; |
| $handler->display->display_options['fields']['fgs_lastModifiedDate_dt']['element_label_colon'] = FALSE; |
| $handler->display->display_options['fields']['fgs_lastModifiedDate_dt']['link_to_object'] = 0; |
| $handler->display->display_options['fields']['fgs_lastModifiedDate_dt']['date_format'] = 'custom'; |
| $handler->display->display_options['fields']['fgs_lastModifiedDate_dt']['custom_date_format'] = 'Y-m-d'; |
| /* Sort criterion: Islandora Solr: fgs_lastModifiedDate_dt */ |
| $handler->display->display_options['sorts']['fgs_lastModifiedDate_dt']['id'] = 'fgs_lastModifiedDate_dt'; |
| $handler->display->display_options['sorts']['fgs_lastModifiedDate_dt']['table'] = 'islandora_solr'; |
| $handler->display->display_options['sorts']['fgs_lastModifiedDate_dt']['field'] = 'fgs_lastModifiedDate_dt'; |
| $handler->display->display_options['sorts']['fgs_lastModifiedDate_dt']['order'] = 'DESC'; |
| $handler->display->display_options['filter_groups']['groups'] = array( |
| 1 => 'OR', |
| ); |
| /* Filter criterion: Islandora Solr: RELS_EXT_hasModel_uri_ms */ |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms']['id'] = 'RELS_EXT_hasModel_uri_ms'; |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms']['table'] = 'islandora_solr'; |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms']['field'] = 'RELS_EXT_hasModel_uri_ms'; |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms']['value'] = 'info:fedora/islandora:bookCModel'; |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms']['group'] = 1; |
| /* Filter criterion: Islandora Solr: RELS_EXT_hasModel_uri_ms */ |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms_1']['id'] = 'RELS_EXT_hasModel_uri_ms_1'; |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms_1']['table'] = 'islandora_solr'; |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms_1']['field'] = 'RELS_EXT_hasModel_uri_ms'; |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms_1']['value'] = 'info:fedora/islandora:pageCModel'; |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms_1']['group'] = 1; |
| /* Filter criterion: Islandora Solr: RELS_EXT_hasModel_uri_ms */ |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms_2']['id'] = 'RELS_EXT_hasModel_uri_ms_2'; |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms_2']['table'] = 'islandora_solr'; |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms_2']['field'] = 'RELS_EXT_hasModel_uri_ms'; |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms_2']['value'] = 'info:fedora/islandora:sp_large_image_cmodel'; |
| $handler->display->display_options['filters']['RELS_EXT_hasModel_uri_ms_2']['group'] = 1; |
| |
| /* Display: Block */ |
| $handler = $view->new_display('block', 'Block', 'block'); |
</code> | </code> |
</WRAP> | </WRAP> |