Skip to content

Instantly share code, notes, and snippets.

@kristianb21
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kristianb21/8b0793526e7c5c6be302 to your computer and use it in GitHub Desktop.
Save kristianb21/8b0793526e7c5c6be302 to your computer and use it in GitHub Desktop.
drupal features setup
Naming Convention:
[theme/site] Feature - TYPE
[theme/site] Feature - Content - TYPE
[theme/site] Feature - ECK - TYPE
Field Bases
Definitions for all fields on the site. All of them. Leave Out ('taxonomy_forums','comment_body','body')
Field Groups
Definitions for all field groups on the site. All of them.
Taxonomy
If I'm utlizing the Taxonomy module, I'll create a Feature that contains all of the vocabularies as well as field instances on the term entities. Also any module that provides taxonomy-related functionality should have its configuration here, as well as dependencies to said modules.
Content Types
Each node type used on the site gets its own Feature. This defines the actual node type as well as the field instances on the type and Strongarm variables that contain configuration for the type. Untick any taxonomy term fields, Field Bases, And Field Groups. Make sure to add comment body field instance for each content type.
ECK Types
Each ECK type used on the site gets its own Feature. This defines the actual ECK type as well as the field instances on the type and Strongarm variables that contain configuration for the type.
User Config
Field instances on the user entity, roles, role/permission assignments, along with Strongarm variables used by the user module. If there are other modules that tie in with some function of the user I may add it as a dependency and add its configuration as well.
Views
All views used on the site go in here, along with dependencies to modules that provide plugins, field types, formatters, etc used by the view. Any module that provides data which is being queried by the views should have a dependency as well.
Context
All contexts built on the site go in here, along with dependencies to any module that provides a condition or reaction used by the contexts.
Pathauto Config
Pathauto contains many Strongarm variables which are used to configure patterns and various behavior when generating aliases. I put all of those along with a dependency in its own Feature.
Menus (Not Links)
Include all the menu settings.
Rules
All rules I create go into one Feature, along with dependencies for Rules and any module that provides a trigger, condition, or reaction utilized in my rules.
Media Config
All input formats and image styles, along with a few Strongarm variables used for image handling go in here. If running the Media module configuration for that and field instances on the file entities would be included as well. (Leave Out Text FOrmats "FULL HTML", "Plain Text", "PHP code")
Site Config
This is mostly Strongarm variables provided by various core and contrib modules. If a module defines it's own "component" to Features or has a tremendous amount of Strongarm variables I will usually put it in a separate Feature.
XML Sitemap
Strongarm variables for XML sitemap along with dependencies to it and any of its sub-modules are included.
Search API Servers
Seacrh API Servers
Search API Indexes
Search API Indexes
Search API Facets
Search API Indexes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment