dkan
dkan copied to clipboard
Required Alternate Functionality of Drupal View in DKAN 2
I have query, I want to create a report of datasets (meta fields such as title, desc, tags, topics etc.). In Dkan 1 there is drupal view of dataset content type & I can play that with that view, I can sort, add filter criteria etc. But I cannot use Drupal views in DKAN 2 because dataset meta information is wrapped in json in field_json_metadata_value column. How can I prepare a report with the same functionality as it is in DKAN 1 with drupal views. Is there any recommendations? Or how can I decode json metadata and prepare a report? Thanks in advance.
@muhammadmohsinali you can create custom code to break up the json metadata into "fields", have a look at
- https://api.drupal.org/api/drupal/core%21modules%21views%21views.theme.inc/function/template_preprocess_views_view_field/8.2.x
- https://kevinquillen.com/overriding-output-search-api-fields-views
- https://github.com/GetDKAN/dkan/blob/2.x/modules/metastore/modules/metastore_admin/metastore_admin.module#L37