Creating Danland sub-theme

This is the descriptions of sub-theme from Drupal.org:

Sub-themes are just like any other theme, with one difference: They inherit the parent theme's resources. There are no limits on the chaining capabilities connecting sub-themes to their parents. A sub-theme can be a child of another sub-theme, and it can be branched and organized however you see fit. This is what gives sub-themes great potential.

Sub-theme scheme

Imagine starting with a base theme designed as wireframes, then applying and refining all the details from a sub-theme. Then, from the same wireframe, testing out alternate designs by branching out another sub-theme. Working on a multi-site installation but you need a cohesive look and feel? With sub-theming, a lot of the design resources can be shared. Site-specific changes can be set to a specific sub-theme, but any shared resources can be edited once to be applied across all the installations. With careful planning, the possibilities are endless.

Learn more about sub-theme.

You can also create a sub-theme for Danland, here's how:

  1. First create a folder inside the Danland's folder. Example: "my-subtheme".
  2. Creating .info file and place it inside my-subtheme folder. Example: my-subtheme.info.
  3. Copy and paste the following code to your .info file.

    name = my-subtheme
    description = Your descriptions here.
    engine = phptemplate
    base theme = danland
    stylesheets[all][] = my-subtheme.css
    regions[superfish_menu] = Superfish menu
    regions[preface] = Preface top
    regions[preface_first] = Preface first
    regions[preface_middle] = Preface middle
    regions[preface_last] = Preface last
    regions[content_top] = Content top
    regions[left] = Left sidebar
    regions[right] = Right sidebar
    regions[content] = Content middle
    regions[content_bottom] = Content bottom
    regions[bottom_1] = Bottom 1
    regions[bottom_2] = Bottom 2
    regions[bottom_3] = Bottom 3
    regions[bottom_4] = Bottom 4
    regions[footer] = Footer
    features[] = logo
    features[] = name
    features[] = slogan
    features[] = mission
    features[] = favicon
    features[] = search
    features[] = comment_user_picture
    features[] = node_user_picture
    features[] = primary_links
    features[] = secondary_links
    core = "6.x"

    Save the my-subtheme.info file.


  4. Copy and paste the page-front.tpl.php, page.tpl.php, style.ie6.CSS and jquery.pngFix.js inside the Danland folder into my-subtheme folder.
  5. Creating my-subtheme.CSS file and place it inside the my-subtheme folder. This is useful if you want to change the look of the theme according to your tastes, so put your custom css and css overrides in this file.

Notes: change the "my-subtheme" word with your desired name.

Danland already includes one sub-theme, so you can learn from it.

Categories:

Address

Susukan Grabag
Magelang 56196, Central Java
Indonesia
info@danetsoft.com

Our Network

Copyright © 2011 Danetsoft. All rights reserved.