ARC-IM's blog

Adding css scroll bars to a view

After searching the internet for a way to add scroll bars to a block view in Drupal 7 it turns out to be rather simple.

Under advanced settings in veiws there is setting for CSS class.  So I added a class to div in my custom css file for my theme.  See for more details about css in drupal 7.

The following classes were added:

Update of data use policy


I finally looked a bit more at the code and instead of putting the policy in the template I modified the template and eml.module to allow eml doc markup.  The changes to eml--node--data-set.tpl.php template was just to remove the  <literalLayout> markup.  For eml.module at line 286 $variables['data_policies'] = check_plain(strip_tags(variable_get('eml_data_policies', ''))); 
was replaced with:
$variables['data_policies'] = check_markup(strip_tags(variable_get('eml_data_policies', ''),'<para><itemizedlist><listitem>'),'eml_text',false);

Entity reference autocomplete fixes

For the Taxa field in Data Set content when using an autocomplete (tags style) widget, a comma separated list of names without the entity id number would not be saved.  The latest dev version of entity reference has fixed this bug.  See

Now a comma separted list of taxa are saved or an error message is displayed if not in the list of taxa.  New taxa will have to created before being referenced in a data set.

Adding Funding Project info to EML

Research Project content modification

To add the eml for <project> element I added additional fields to the Research Project content:  Project Funding and Funding Number 

Update Jan 2019:  One final step was missing from this doc.  The newly created field needs to be unhidden in the dataset eml display.  See the details at the end of this blog.

(The motivation for this was for data replicated to the Arctic Data Center  which needs the funding grant numbers.)

Changing Taxa vocabulary to a entity for eml export

Adding a taxa vocabulary to DEIMS dataset EML export.

Inigo in added a taxa entity to capture taxa information.  However I had already created a hierarchical taxonomy vocabulary for storing taxa information. For example Betula nana term would be under Betula.  In the dataset content type I added a term reference field for the taxa vocabulary. When clicking on a taxa term one gets a list of the datasets associated with that term. 

Linking biblio authors to people

The DEIMS person content has a Associated Biblio Author field.  In order to populated this field I created two data export views:

1) I exported a csv file of  "Author id","Author full name","Author last name", "","","Person Name","Email","Nid","Title"  (note that the Person Name is the from the person content referencing that Author id)

2) A csv file of  "Nid","Name","Last Name","Associated Biblio Author" from the person content

Importing Taxa using Feeds and Feeds Tamper

In trying to correct a migration mistake where I forgot to set the entity Taxa in datset  to unlimited terms(default was 1) I ran into a problem with feeds.  Earlier I had used feeds to import the reversion numbers for the datasets since migrating did not bring over the revision numbers. It turns out the once a feed uses a variable as a unique id (in my case Data Set ID) only that feed importer will work.  Cloning it or setting up another will result in creating new nodes.


Subscribe to RSS - ARC-IM's blog