Changing, adding and removing fields
NodeStream comes with a number of fields by default. They are carefully selected in order to be good sane defaults, but there are of course times when you want to change them, remove them or add new ones.
In order to not be in the way, NodeStream does not put any of it's fields into features. This choice was made because that would make NodeStream incompatible with a large number of modules due to the nature of how fields are stored in Drupal, among those are Display Suite and Field Permissions. Adding such a module to a NodeStream site would make NodeStream features containing fields overridden, and since the focus of NodeStream is to be a platform for distributions, that is not acceptable.
In order to remedy this, we decided to just put install upon installation. This is done through the Default config module, which means it is possible to roll back to the default through the Default config UI.
Adding new fields
Adding new fields to your own features is a simple process, just use Features as you normally would.
Changing existing fields
Since fields are not part of features, it means you can put them in your own features yourself. Make any alterations you need to them and put them in one of your own features, and your changes will be used upon installation of your module.
Removing NodeStream fields
This is a bit trickier. Since the NodeStream fields are not tracked by features, they will not be removed. This can be done in if you have NS Core module installed however by adding something like this to an .info file in one of your modules:
nodestream_fields[delete][] = name_of_field_to_remove
This will ensure that the field you specified will be removed when the module is installed. In order for this to work, the module needs to depend on NS Core. It also needs to depend on the feature in which the field is defined. For example, if you want to remove a field in ns_article, your module needs to depend on both ns_core and on ns_article.
Note that this might be very dangerous, so use with caution.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion