0

I need to classify and mark my content types. As example I have three content types for group messages in OG, ten content types which used as UC products, etc. So I need to add taxonomy and fields to my content types (NOT for nodes of content types, but to content types!) and then filter them. As example I could show only OG message types, or only product types, or only products which are clothes etc. So I thing I need a module which turn content type to something like entity.

Is there any module which implements such feature?

It is hard to search such module, because if I search like "add fields to content types" I see results how to add fields to nodes of content types, which will be populated in node forms. But I need to add fields to content type form, to classify and mark content types, not nodes of content types.

  • Going down that route would be a lot of work (if a module doesn't exist, which I'm not sure it will do for what you're asking). An alternative would be to do what countless other modules do and add settings to the content type form which they manage separately. – Clive May 16 '15 at 9:26
  • You'll have to create a new module with a field to mark/tag your entity types (could use taxonomy for managing terms) then utilise entity settings so the options appear in the form in admin/structure/types/manage/TYPE. Have a look at how other modules do it and maybe look at field_bundle_settings() – jowan sebastian May 16 '15 at 11:22
1

I don't know if it goes far enough for you, but the Content type groups module helps you categorise content types.

Content type groups was designed to handle the use case when you need to populate select boxes or other interface elements with certain content types but not others. This module allows you to create an unlimited number of groups of content types through the UI. Once a group is created, it can be referenced in code using API functions and in Views.

Example

Let's say you're organizing your media collection. You have the following content types: book, movie, audio, article (for your blog about your collection), and page (for some static content).

Create a content type group called Media and add the book, movie and audio types. You have just created a logical grouping between the content types to show that they are related. This makes it easier for future developers to understand the relationship between various content types.

Now let's say you start collecting old magazines. You create a new content type called magazine and add it to the Media content type group. Any place where Media is referenced will automatically reflect the change; there is no need to track down all Views or lists.

This module is being rewritten to turn content type groups into entities, with a dependency on Entity API. The 2.x branch is heavily under development and not ready for any site use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.