. Learning from the Fusion theme file structure
2. There's not a "template dot php" file. It's clear that this folder is not a theme folder in itself. And if we took a look at the "README" file, we'd find out actually this folder contains three separate themes that can be installed individually.
3. So there's instructions on how to do that. So what we would end up doing is moving one or more of these folders up one level so that it was part of the theme's directory. Let's go ahead and look at how "fusion_core" is structured.
4. I'm going to go ahead and scroll down. So you see we have some folders. We have one for "css", "images", and "java script".
5. And then all of the template files are in the base directory as well as the "template php" and "theme-settings dot php" files. Let's go ahead and take a look at how the CSS is structured. We're going to expand this "css" folder and scroll down.
6. You see we have several files that start with "grid". There's several that start with "grid twelve" and then several that start with "grid sixteen". This demonstrates that this particular theme is using a grid system.
7. If you are not familiar with grid systems, you should look it up. It's an interesting idea, but there are specific styles directed at the grid and right to left grids as well. There's some rules for Internet Explorer six, seven and eight for this one.
8. There's specific styles and then there's this style sheet down here, "typography", which is a separation out of the types of fonts that are being used and the styles around the fonts. So this is something that we haven't seen in the previous themes that we looked at. And then there are several styles related to "superfish" which is a java script based CSS based drop down tool for menus.
9. Ok. Let's go ahead and collapse this. One other thing that interesting about this file structure is that the base theme is on the same level as the sub theme.
10. So in "zen" you saw that the sub theme started kit was inside of the base theme. In this one they are separated out. One benefit to doing this is that when a user goes to create a sub theme, it's clear that it's a separate entity.
11. Whereas with "zen" it can be a little hard to figure out that you need to move that starter kit outside of the base theme or at least that that's an option when you go to structure your sub theme.
In this collection, we introduce you to the techniques you need to track down the source of any output in Drupal and adjust it in an organized, predictable way. We also really flex Drupal's theming system to do things like:
- Build a theme from scratch, create a sub-theme and clone a theme
- Add new theme settings (including color pickers)
- Override page, block and node templates