Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This project is not covered by Drupal’s security advisory policy.
Units module provides very simple API for working with unit types collections. This module introduces ability to create units and make conversions between them.
Units 7.x
There has been a major code rewrite before introducing 7.x version. Now measures and units are represented as 2 new entity types. Module depends on:
- Entity API module;
- CTools module.
Features
- Integrates with Features module - you can export/import your measures and units among Drupal instances;
- Fields - you can attach any arbitrary fields to units on per measure basis.
- Entity Translation - then you can translate fields attached to your units
- Currency - integrates with Currency module, so the currencies become available within Unit module.
- Pre-created common measures and units - a set of common measures (and common units within them) are shipped within a Unit submodule. You only tick the checkbox and do not have to insert them by typing in all the stuff.
- Extendable conversion logic - out of the box the module can only convert simple units (those, that can be converted by multiplication) and temperature. However, it is designed to be extendable with CTools plugin to support more sophisticated logic, if need be.
Modules that integrate with Units:
- Units module is bundled with Currency Units module that implements currencies provided by Currency API
- UnitsAPI starting from 25 Jan 2010 should make additional common units available
- Measured Value Field - allows you to attach values measured in some units to your nodes, taxonomy terms, etc, and then output the entered measured value in any other unit.
- Units UI show factors is a small module that displays conversion factor on the overview of units.
API Documentation
Please see API.txt bundled with the module.
Project information
- 182 sites report using this module
- Created by crea on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
7.x-1.0-rc1
released 11 March 2016
Works with Drupal: 7.x
✓ Recommended by the project’s maintainer.
mostly new features
Development version: 7.x-1.x-dev updated 30 Jan 2018 at 22:58 UTC