Drupal 7 Bartik Subtheme Video
Moing forward I am going to be basing tutorials on Bartik. It's best to setup your own sub-theme this will allow you to keep your own files such css and templates and allow you to easily upgrade to later versions of Bartik.
Creating a subtheme is straight forward but sometimes people leave out the odd line which does cause problems. This tutorial will be a step by step guide which wil hopefully get your subtheme created easily.
- Create your subtheme folder in sites/all/themes directory. I'll call mine nige_bartik and go into the folder.
- Create your info file, to keep my naming convention the same as the folder I'll call mine nige_bartik.info. Then copy the contents of themes/bartik/bartik.info file into your new file.
- Rename the name field to your new subtheme.
- Delete the lines for package and version
Add a new line underneath core and add
base theme = bartik
- Remove all the stylesheets and add your own one. I'll create my own folder called css and create a css file called mystyle.css.
Add mystyle.css to your .info file for example
stylesheets[all] = css/mystyle.css
- Now I'll add color support to the subtheme. Copy the file themes/bartik/css/colors.css into your subthemes css directory and the copy themes/bartik/color folder into the subtheme directory
Add the css file to your .info as such
stylesheets[all] = css/colors.css
Your .info file should look something like this
name = nige_bartik description = A flexible, recolorable theme with many regions. core = 7.x base theme = bartik stylesheets[all] = css/mystyle.css stylesheets[all] = css/colors.css regions[header] = Header regions[help] = Help regions[page_top] = Page top regions[page_bottom] = Page bottom regions[highlighted] = Highlighted regions[featured] = Featured regions[content] = Content regions[sidebar_first] = Sidebar first regions[sidebar_second] = Sidebar second regions[triptych_first] = Triptych first regions[triptych_middle] = Triptych middle regions[triptych_last] = Triptych last regions[footer_firstcolumn] = Footer first column regions[footer_secondcolumn] = Footer second column regions[footer_thirdcolumn] = Footer third column regions[footer_fourthcolumn] = Footer fourth column regions[footer] = Footer settings[shortcut_module_link] = 0
- Now clear your cache, go into your appearance list and enable your new subtheme. Hopefull it will show up in your appearence list as such
- New post: Posting location co-ordinates to a drupal service - Part 2 http://t.co/MQhlVKBNKC — 1 month 4 days ago
- New post: Posting location co-ordinates to a drupal service - Part 1 http://t.co/2xlYgqFaJ0 — 1 month 5 days ago
- New post: Connecting a drupal service with a mobile application - Part 2 http://t.co/01cFtAunDs — 1 month 5 days ago
- New post: Using drupal services to connect to mobile applications - Part 1 http://t.co/VEURftHCef — 1 month 5 days ago
- New post: Creating Drupal 7 video gallery http://t.co/HvpKU7uT — 3 months 1 week ago