Allow a content type only once (Only One)
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
The Allow a content type only once module allows the creation of Only One node per language in the selected content types for this configuration.
Uses
Configuring content types
To configure the content types to allow for Only One node per language, visit the Only One page (admin/config/content/onlyone), in the Available content types for Only One section check the content types that should have Only One node per language, for this you need the Administer Only One permission.
Creating nodes
Once you try to Add content (node/add), if the chosen content type is configured to have Only One node and it have one node created in the actual language, you will be redirected to edit the node, otherwise you will go to create a new node.
Drush commands
- drush onlyone-list
- Shows a content types list according to the selected status.
- drush onlyone-enable
- Enables the 'Only One node' mode on content types.
- drush onlyone-disable
- Disables the 'Only One node' mode on content types.
Help Needed!
#2868701: Improve the module strings
Recommended modules
- Drush Help
- Improves the module help page showing information about the module drush commands.
Similar Projects
- Node Limit
- Allows to restrict the number of nodes of a specific type that roles or users may create.
Differences:- The user with uid 1 can create unlimited nodes even if you define the limit
- If the node limit for a content type is 1 and you create a node, you can't translated
- If the node limit for a content type is 1, and you have created a node, if you try to add a new node you are not redirected to the existing node edit form
- There is not drush commands to interact with the module
- You can limit the node creation by users and roles
- Entity Limit
- Allows to restrict the number of entities of a specific type that an user or role may create.
Differences:- The user with uid 1 can create unlimited nodes even if you define the limit
- If the node limit for a content type is 1 and you create a node, you can't translated
- If the node limit for a content type is 1, and you have created a node, if you try to add a new node you are not redirected to the existing node edit form
- There is not drush commands to interact with the module
- You can limit the node creation by users and roles
- Entity Rules
- Provides a page for selecting and creating Rules components that will be executed when different operations happen to an Entity of a particular bundle.
Differences:- Needs Rules to works
- Requires a lot of configurations, you can take a look inside the Entity Rules Node Limits sandbox
- There is not drush commands to interact with the module
- You can limit the node creation by users and roles
Issues
As with all contributed modules, when considering submitting an issue:
- Read the documentation (two or three times is better). Don't forget the home page.
- Review the existing issues list. (Don't forget to select "<- Any ->" for the "Status" field.)
- Gather all the appropriate information. This may include (but is not limited to):
- Drupal version.
- Browser type and version.
- Database type and version.
- Error messages, if any.
- Module settings.
- Submit the issue. If other modules are involved, you may need to submit the issue to those modules as well.
- If you go to provide a patch use the following naming convention:
[onlyone]-[short-description]-[issue-number]-[comment-number]-[drupal-version].patch
And please don't forget to use the Issue Summary Template to report an issue, if you need help to understand how the issue queue works, see the Getting Started in the Issue Queue video.
Development version status
The development versions (-dev) are where the newest stuff is, including any bug fixes and new features. We try to make sure it is tested before we commit anything, but occasionally a bug will get by us. Your help on testing this code is greatly appreciated. The translation templates may not always be up-to-date in the dev releases.
