1

I have created a custom installation profile/ distribution with exported config files of a site. I have 4 content types in this site from which two will be installed by default but for other two are optional.

I can see a couple of options:

  1. Creating a custom module for each content type and putting related config files in it. (This does not allow any option at installation time although I can enable the module using info file of profile)

  2. Custom form alter of installation form and add check boxes.(If I want to combine this with option 1 then how can I do that?)

    Checkbox-> Content type 1 (This is disabled and checked)

    Checkbox-> Content type 2 (This is disabled and checked)

    Checkbox-> Content type 3 (Optional)

    Checkbox-> Content type 4 (Optional)

    All the related config files of checked content types should be enabled at installation.

I would like to go with option two and give user check boxes at the time of installation of profile but if there are any better ways to do it then please do suggest.

Thanks in advance.

0

I would think in either case, you should provide the Content types as modules and allow the user to enable them any time after installation. Otherwise, how do you expect them to enable the content types if he chooses to skip them during install?

The way to provide additional options during a profile install is hook_install_tasks(), also check this blog.

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.