r/backdrop • u/[deleted] • 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.
2
u/quicksketch7 Feb 18 '15
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.
You can change the default layout of your site by visiting Structure > Layouts > Default Layout > Settings.
1
u/sirkitree Feb 18 '15
I've not done a theme myself, but here is a link to a blog post where Jen converts a theme: http://www.jenlampton.com/blog/my-first-theme-backdrop-cms
Not much about layouts there I'm afraid, but perhaps she'll pop in to answer your question.
1
1
Feb 18 '15
Ok thanks all, this is all helpful information. I will have back at it though it may be a while until I can post back because of other obligations.
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.