It's often useful to provide two versions of a given string: one that's intended for human viewing and another that's intended for use in database queries, URLs, and so on.
In Drupal, this is generally known as a 'Name' and 'Machine name' pair. Drupal 7 even provides a prefab FormAPI element to simplify the process of entering these matched pairs.
Safeword exposes a custom FieldAPI field type that stores two strings using the name/machine name approach. It can be useful when generating PathAuto aliases, exposing Views arguments, and so on.
One common use is to not give users permission to 'Create and edit URL aliases' and instead give them access to a Safeword field which uses the node title as it's source. So that users can only edit a limited part of the path, keeping safe the other parts that your site features may rely on.
Can use the node Title or taxonomy term name field as the source of the machine name.
Can provide it's own text field as the source of the machine name.
Machine name field is shown next to the source field, clicking 'Edit' makes the machine name editable in it's own field.
Option to show a live preview of the full path to the node or term while the machine name part of it is being edited.
Option to require machine names to be unique per content type or vocabulary.
Option to convert accented characters like øéåî to Roman letter equivalents, uses integration with the Transliteration module.
Can remove HTML intelligently without leaving 'p', 'div', etc. in the machine name.
Machine Name module adds a field type into which the user enters a machine name, it's main function is to validate that the input conforms to the machine name format.
Safeword module is different to Machine Name module as it provides a standard text field and when text is input displays a matching machine name field which automatically converts the text into a machine name formatted version, which can also be hand edited.
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Content, Content Construction Kit (CCK), Fields, Path Management
- Reported installs: 838 sites currently report using this module. View usage statistics.
- Downloads: 4,502
- Last modified: January 20, 2015