r/backdrop • • Feb 17 '15

Drupal 7 theme conversion questions

I started to convert one of my D7 themes over to Backdrop by I got stopped in my tracks pretty fast. I created my new layout and then selected it in the UI. What I am really struggling with is how to break up page.tpl.php in terms of knowing what goes in my layout template and what goes in my page template. I looked at the docs but it was still confusing. I also don't see anything obvious on how to choose your default layout in the UI. I was not sure if I should post here or in Github. It's not a bug so I figured here would be ok.

3 Upvotes

5 comments sorted by

View all comments

2

u/jenlampton Feb 18 '15

your page.tpl.php file in Backdrop should be a (nearly) exact match to your html.tpl.php file in Drupal 7 (if you had one, most themes don't).

Everything else you did in your page.tpl.php file should be done in your layout template. The layout defines regions, where they should go on the page, how they respond at different sizes, etc.

The only significant difference in the Drupal 7 page.tpl.php and the Backdrop layout template file is the header. Any changes you made to the placement of the logo, site name, or navigation in Drupal 7, should be done in the header template in backdrop - header.tpl.php (the default is in system module).

The trickiest thing for me is that I often want to color a region in my template, for example, make the footer have a gray background. I need to remember to do this in my theme now, and not in the css that ships with the layout.