Question

I am planning to use features to bundle some of my specific works. Example: I want to bundle article content types along with its views, fields and related other stuffs. Can I just use features to create new article module through features ui and use it? How would it behaves when there is already configuration related to article in my sync folder which contains entire site configuration? Does anyone has experience on working with both of them simultaneously?

Thanks,

CIsSharp

Était-ce utile?

La solution

Can I just use features to create new article module through features ui and use it?

Except for some very trivial use cases: No. But Features still is a good starting point and a big time saver.

  • Don't expect Features to produce ready-to-use modules of complex Features. It is a great code/stub generator, but be prepared for finetuning both before in Features UI and afterwards on file level.
  • Plan your fields carefully: While single-use fields make it easier to create Feature modules, but reusing fields (or more exactly: reusing field storage) across different node types saved me a lot of work later in Views and themeing.
  • I always use "Mark all config as required" and "Allow conflicts", and afterwards move the generated config from config/install to config/optional. I guess this is not the standard Features workflow, but I do this for 2 reasons:
    • It prevents clashes between Features and existing core config/sync. If an optional config setting already exists, it will silently be ignored instead of stopping with errors.
    • I found it way easier to manage larger but meaningful modules with some duplicated config, than to split everything into super-small modules with a dependency nightmare.

I'm not quite certain if my experiences are useful to you though, because we are a small company with me being the sole developer. We are trying to reuse Features across different projects, not to avoid collisions on the same project.

Licencié sous: CC-BY-SA avec attribution
Non affilié à drupal.stackexchange
scroll top