Tag Archives: Module

How to deal with your custom module updates ?

At first, it can be hard to maintain and update your custom module but when you understand how it works, it’s pretty easy.

In your module.install file you will create a function for each update you want to make, for example, you forgot to add an agenda field in your content type : Read More →

How to change default properties on custom drupal type nodes ?

If you want to set some default properties on your freshly created custom node type on Drupal, you have to use variable_set syntax like this:

In your <my_custom_module_name>.install file, add these lines according to what you need to set.

If you want a language to be set by default, use this:

  • 0 – Disabled
  • 1 – Enabled
  • 2 – Enabled with translation (core’s translation.module – TRANSLATION_ENABLED)
  • 4 – Enabled, with field translation (entity_translation.module – ENTITY_TRANSLATION_ENABLED) Read More →