4

I am using the Omega 4 base theme, and am trying to override page.tpl.php.

This file is in the base theme in sites/all/themes/omega/templates/system. When I copy it into my theme, edit it, clear caches, I don't see my changes?

Why can't I override this template?

1
  • 1
    To help those landing here: If you want to modify the layout for all pages, simply follow @MPD instructions in the first answer and edit sites/all/themes/_your_theme_/layouts/simple-layout.tpl.php (or whatever you copied the layout as). If you want to make changes for specific pages, see drupal.stackexchange.com/questions/123117/… Commented Jul 23, 2014 at 13:24

1 Answer 1

8

Omega 4 includes a few changes. From the project page (emphasis mine):

The Omega theme provides layouts as a method of managing page templates along with layout specific stylesheets and regions. This allows you to write highly customized layouts that can be contextually switched. You can disable this feature to use the plain page.tpl.php or even use Omega 4.x together with Panels and Panels Everywhere to gain even more control over your pages if required.

If you want to use the new layout system, clone sites/all/themes/omega/layouts/simple into your theme, rename the files, edit the layout include, and clear caches.

The goto admin/appearance/settings/mytheme, and click on the Layouts tab. If you did everything correctly, you can select the layout you just created, and then save your configuration.

If you don't want to use the layout system, and just want to use page.tpl.php, then untick Enable Layouts extension, and save your configuration.

4
  • Thanks for your help. I have tried to disable "Enable Layouts extension", and got the changes writed in the page.tpl.php. But do you know how to enable the "Enable Layouts extension" and also override template successfully ?
    – Rylyn
    Commented Jul 9, 2013 at 1:16
  • If you are using layouts, then page.tpl.php doesn't get used. Your layout template gets used instead.
    – mpdonadio
    Commented Jul 9, 2013 at 1:18
  • could you talk more detail about "even use Omega 4.x together with Panels and Panels Everywhere to gain even more control over your pages if required.". I don' t know how to do it. Thanks!
    – Rylyn
    Commented Jul 9, 2013 at 3:11
  • @Rylyn: There is an issue for that on d.o.: Inform Panels about Omega Layouts ... currently it's not yet possible.
    – LarS
    Commented Sep 2, 2013 at 23:58

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.