While DKAN includes a free-tagging tags/keywords field for datasets, many data portals organize datasets into more predefined categories by subject matter. These are usually a small collection of subjects with logos that are incorporated into the site navigation. Neither DKAN’s tags or “groups” (which are designed for grouping user permissions and usually represent organizational divisions) are exactly appropriate for this task.
The DKAN Topics module adds a “topics” vocabulary to DKAN, and corresponding functionality throughout the site. It adds a facet to the search/datasets page, and a pane to the default homepage. Topics can be administered through the standard Drupal taxonomy interface.
DKAN Topics is enabled by default on new DKAN installations, with default terms loaded into the vocabulary. The module can be disabled and uninstalled, and all existing topics will be removed.
- Users with the Site Manager or Editor role can add and edit topic terms.
- Users with the Administrator role can add new icons.
Adding a new topic term¶
From the Administration menu, navigate to
Site Configuration > Taxonomy > Topics > Add term
|Name:||Enter the term for your new topic.|
|Description:||This field is not currently displayed publicly.|
|Icon Type:||DKAN Topics comes with a default set of font icons that can be used with your terms, you can upload your own font icons if desired. See Adding new icons. Or you may select to use image icons, when you toggle the image option, an image upload input field will appear.|
|Icon:||If using font icons, select the icon you want to associate with your topic term.|
|Icon Color:||Icons will display the same color as text on datasets unless a specific color is selected here.|
Editing topic terms¶
- From the Administration menu, navigate to
Site Configuration > Taxonomy > Topics
- You will see a list of current topic terms, click the ‘edit’ link under Operations that corresponds to the term you would like to edit.
- Make changes and click “Save”.
Adding new icons¶
The font used for Topics can only be changed if there are NO default icon values in use, only one icon font can be used at a time.
- Navigate to
Configuration > Content Authoring > Font Icon Select Options
- Click “Upload New Library”
- Enter a title for your new font option
- Upload the four files for your font
- Click “Save”
- Navigate to
Structure > Taxonomy > Topics > Manage Fields > Icon
- Select your font from the font dropdown in the Icon field settings section.
- Click “Save settings”
- This module adds a main menu link for “Topics”. If you want a different word in place of “Topics”, you can change the name in the main menu configuration but the icons in the dropdown will stop working. If you use String Overrrides you can change the Menu link title and the icons will continue to work, however the facet block title and the dataset form field title will still display as ‘Topics’.
- Adding a new icon font for use with topics needs work to keep the icon functionality in facets and menus from breaking.