Community

Homepage is made up entirely of custom modules. Bad practice?

I am studying an existing site in order to try and understand how to structure my first site that I've been assigned to build...

Looking at the blocks section, and by clicking on configure, I am unable to make any significant changes. This makes me think that they are all custom modules because of their custom names (to reflect the sitename). Also, looking at the list of Modules, there are modules to reflect all these Blocks.

I have been reading about drupal a lot, and remember reading that it is not recommended to create modules for everything. Is this bad practice? Or is it perfectly acceptable to create custom modules for every single block?

Comments

Home page

Hi,

If there is already module exist in drupal.org for some specific functionality, so we do not need to create another module for the same functionality.

When we create website in Drupal CMS , we also consider that it should be user friendly. If we can manage a block using block admin in Drupal CMS, we need to follow it and if a block is created for some specific functionality, we can create a custom module for the same.

Thanks for that. If you

Thanks for that.
If you wanted to apply a background image to a block, would you do so by targeting the block in the css or would you create a module and assign the necessary ids classes in there?

What I am struggling to understand is when do you target the automatically generated classes and ids that drupal wraps around newly created blocks and apply styles to those via css, and when do you instead create a new module...

By specific functinality what about:
Adding a background image behind all page H1 in the main content area. WOuld you create a new module for this alone?
What about an image block which changes depending on the page you are on. The location or size don't change, just the image itself.

nobody click here