2

I want that block titles have the h3 tag instead the h2 tag. As I understand I have to change this in the file block.tpl.php. I found 4 block.tpl.php

  • root/modules/block/

  • sites/all/themes/omega/omega/templates

  • sites/all/themes/omega/starterkits/omega-xhtml/templates

  • sites/all/themes/omega/alpha/templates/

My question: Which one is the right file to change? I took now the one in the omega folder and it worked (the one in the modules folder did not). But I want to be sure whether this is the correct in order not to have side effects. And what for is the modules/block directory with files?

thanks for any feedback

2 Answers 2

6

As a rule, we should never make changes in core files. If you will read the readme.md file in omega theme, you will see the following,

Omega 4.x is a base theme and as such should never be used or modified directly. Instead, you should use the sub-theming functionality provided by Drupal.

The easiest way to create a new Omega-based sub-theme is by using Drush. Omega comes with a very easy-to-use Drush command for generating sub-themes through a command-line wizard. You can start the sub-theme creation wizard by invoking drush omega-wizard in the command-line.

So you should first create omega sub-theme which is quite easy process and then make changes in sub-theme's block.tpl.php file.

1
  • thanks to both of you for the fast answers. I am not a programmer, but understood what has to be done.
    – Beauregard
    Commented Nov 8, 2013 at 13:26
0

Drupal gives you really easy ways to override core functionality, including themes and modules. In your case, the best thing you can do is to create a sub-theme for your Omega theme.

A sub-theme is basically a theme that inherits functionality from a parent theme. Follow the instructions from here: Creating a sub-theme

Once you've done that, you can manually copy those files from the parent theme into your sub-theme, to override them, and change them as much as you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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