SlideShare une entreprise Scribd logo
1  sur  17
Drupal theming Wilson Wingston Sharon wingston.sharon@gmail.com
When you access a Drupal website, what you see on the screen is the result of the site's active theme files.  As the theme files call the data, the files also set the styling, position, and placement of the content on your screen.
How a CMS functions - again Text and pointers to other kinds of content are stored in the database;  that data is then dynamically retrieved, composed, and presented to a user in response to a request sent from a web browser.  Drupal functions  with the themes playing the crucial role in the formatting and presentation of the contents
Remember 1. You Can Theme It All The Drupal system allows you to specify different page templates for different purposes on your site.  2. Build with Blocks The process of activating modules and assigning blocks to regions on the pages is one of the most basic and most important skills Each of the blocks in the system, whether created by modules or manually created by the system administrator, can be themed individually, if you so desire. 3. Intercept and Override
Intercept and override several opportunities for you to affect the output prior to the data's arrival fron DB on the viewer's screen. The best practice approach to customizing themes involves intercepting and overriding files and styles—not altering the core.   By choosing to affect the system's output at the highest levels of Drupal's processes, we leave the core in a purer state.
Files making up a theme block.tpl.php – Defines the appearance of the blocks on the page. box.tpl.php – Defines a specific format—a box used to frame things (like comments in the Bluemarine theme). comment.tpl.php – Defines the appearance of the comments which follow items. logo.png – An image file containing the logo used in the theme. node.tpl.php – Defines the appearance of the nodes. page.tpl.php – This is the primary theme file. style.css – The style sheet for this theme.
Finding Themes online Go to drupal.org themes section and download themes for your drupal version. Do not use conflicting versions. Eg for drupal 6.x versions, download themes with 6.x in the file name. Do not use alpha versions. Use beta ones at your own risk. Download your theme. You’ll get it usually as a tar.gz
Setting up themes Remember the sites/all/modules folder where we put the downloaded modules? Go to c:/wamp/www/mysite/sites/all and make a folder called themes. Extract your theme into that folder. Go to administer>>themes Click the radio box for default on theme you like and click ok.
configure Click the configure link, make sure you are on global settings. Here, you can set up theme options for all themes you might have. These override individual theme options. Now click on the theme links you see, all enabled themes show up as a link and you can give them individual settings too. Some themes have a lot of individual settings that you can exploit.
Zen Zen is the ultimate starting theme for Drupal. If you are building your own standards-compliant theme, you will find it much easier to start with Zen Support: Providing or receiving support for any theme you develop in Drupal’s normal support forums can be difficult. Bug fixes & updates: Occasionally there will be bugs found in Zen core. If you have modified any of Zen’s core files, it will be difficult for you to incorporate any of those bug fixes into your modified version of Zen.
Theming trick –Create a custom user login bar Display a compact, nice user login form that can fit in one line. Once user is logged in, It will display a welcome message and a couple of helpful links. We’ll do this in the garland theme. So go to admin>>themes and move back to garland. Garland files will be in c:..ysitehemesarland
Approach Drupal is very powerful, it's so flexible that you have many ways to do things. That's why a 5 minutes of thinking is very recommended before we get our hands dirty. a separate function, call it garland_user_bar(). It decide, and return HTML for the login form, or the welcome message. page.tpl.php, we will place a call to this function somewhere where it gets displayed in the top. Now we have the logic, after that we will write some CSS to style it, to change how it looks
Open the folder styling files. You can copy paste code from here to where I tell you. First open the page.tpl.php from garland root theme folder. Add <div id="navigation"><?php print garland_user_bar() ?></div>  from 1. page.tpl.code on line 16, just under the body tag. Save and close.
Adding the php function Open themes/garland/template.php  Append the contents of 2.template.php.txt I provided to the end of this file. function garland_user_bar() {  global $user;                                                                  $output = '';  if (!$user->uid) {                                                               $output .= drupal_get_form('user_login_block');                              }                                                                              else {                                                                           $output .= t('<p class="user-info">Hi !user, welcome back.</p>', array('!user' => theme('username', $user)));       $output .= theme('item_list', array(      l(t('Your account'), 'user/'.$user->uid, array('title' => t('Edit your account'))),      l(t('Sign out'), 'logout')));  }      $output = '<div id="user-bar">'.$output.'</div>';  return $output;}
styling Open themes/garland/page.tpl.php Add contents of “3.stylecode.txt” after line 15, before the </head tag. <style type="text/css" media="all">@import "<?php print base_path() . path_to_theme() ?>/user_bar.css";</style> Copy user_bar.css into the garland theme root.
Wingston.sharon@gmail.com www.workshopindia.com workshopindia@gmail.com queries@workshopindia.com

Contenu connexe

Tendances

Web development and web design with seo
Web development and web design with seoWeb development and web design with seo
Web development and web design with seoRajat Anand
 
Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeMediacurrent
 
Firstborn child theme word camp presentation - atlanta 2013
Firstborn child theme   word camp presentation - atlanta 2013Firstborn child theme   word camp presentation - atlanta 2013
Firstborn child theme word camp presentation - atlanta 2013Evan Mullins
 
DrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme DevelopmentDrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme Developmentultimike
 
Approaches To WordPress Theme Development
Approaches To WordPress Theme DevelopmentApproaches To WordPress Theme Development
Approaches To WordPress Theme DevelopmentCatch Themes
 
Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015topher1kenobe
 
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015topher1kenobe
 
Drupal Themes: Past, present and future
Drupal Themes: Past, present and futureDrupal Themes: Past, present and future
Drupal Themes: Past, present and futureNicolas Borda
 
Upgrading a Plone 3 Theme for Plone 4: Beyond the Basics
Upgrading a Plone 3 Theme for Plone 4: Beyond the BasicsUpgrading a Plone 3 Theme for Plone 4: Beyond the Basics
Upgrading a Plone 3 Theme for Plone 4: Beyond the BasicsHeather Wozniak
 
HTML Start Up - Introduction to HTML
HTML Start Up - Introduction to HTMLHTML Start Up - Introduction to HTML
HTML Start Up - Introduction to HTMLGrayzon Gonzales, LPT
 
Aleph500 How we made it our own
Aleph500 How we made it our ownAleph500 How we made it our own
Aleph500 How we made it our ownBill Drew
 
10 Steps to Becoming a WordPress Theme Ninja
10 Steps to Becoming a WordPress Theme Ninja10 Steps to Becoming a WordPress Theme Ninja
10 Steps to Becoming a WordPress Theme NinjaTony Cecala, Ph.D.
 

Tendances (20)

Drupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating ModulesDrupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating Modules
 
Daughter Themes
Daughter ThemesDaughter Themes
Daughter Themes
 
Web development and web design with seo
Web development and web design with seoWeb development and web design with seo
Web development and web design with seo
 
Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-Theme
 
Web1
Web1Web1
Web1
 
Web1
Web1Web1
Web1
 
Web1
Web1Web1
Web1
 
Firstborn child theme word camp presentation - atlanta 2013
Firstborn child theme   word camp presentation - atlanta 2013Firstborn child theme   word camp presentation - atlanta 2013
Firstborn child theme word camp presentation - atlanta 2013
 
DrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme DevelopmentDrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme Development
 
Approaches To WordPress Theme Development
Approaches To WordPress Theme DevelopmentApproaches To WordPress Theme Development
Approaches To WordPress Theme Development
 
Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015
 
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
 
Drupal 6 Theming
Drupal 6 ThemingDrupal 6 Theming
Drupal 6 Theming
 
Drupal Themes: Past, present and future
Drupal Themes: Past, present and futureDrupal Themes: Past, present and future
Drupal Themes: Past, present and future
 
Upgrading a Plone 3 Theme for Plone 4: Beyond the Basics
Upgrading a Plone 3 Theme for Plone 4: Beyond the BasicsUpgrading a Plone 3 Theme for Plone 4: Beyond the Basics
Upgrading a Plone 3 Theme for Plone 4: Beyond the Basics
 
HTML Start Up - Introduction to HTML
HTML Start Up - Introduction to HTMLHTML Start Up - Introduction to HTML
HTML Start Up - Introduction to HTML
 
Feathertheme
FeatherthemeFeathertheme
Feathertheme
 
Aleph500 How we made it our own
Aleph500 How we made it our ownAleph500 How we made it our own
Aleph500 How we made it our own
 
10 Steps to Becoming a WordPress Theme Ninja
10 Steps to Becoming a WordPress Theme Ninja10 Steps to Becoming a WordPress Theme Ninja
10 Steps to Becoming a WordPress Theme Ninja
 
Html intro
Html introHtml intro
Html intro
 

Similaire à 7 Theming in Drupal

SynapseIndia drupal presentation on drupal best practices
SynapseIndia drupal  presentation on drupal best practicesSynapseIndia drupal  presentation on drupal best practices
SynapseIndia drupal presentation on drupal best practicesSynapseindiappsdevelopment
 
Drupal 7 install with modules and themes
Drupal 7 install with modules and themesDrupal 7 install with modules and themes
Drupal 7 install with modules and themesGeshan Manandhar
 
Demystifying drupal 7 theming
Demystifying drupal 7 themingDemystifying drupal 7 theming
Demystifying drupal 7 themingAnthony Ogbonna
 
Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8Anne Tomasevich
 
Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend developmentsparkfabrik
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentsparkfabrik
 
Drupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsDrupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsMicky Metts
 
Adopt or hack - how to hack a theme in a Drupal way
Adopt or hack - how to hack a theme in a Drupal wayAdopt or hack - how to hack a theme in a Drupal way
Adopt or hack - how to hack a theme in a Drupal wayMarek Sotak
 
Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010Emma Jane Hogbin Westby
 
Joomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic TemplatesJoomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic TemplatesAndy Wallace
 
Joomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic TemplatesJoomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic TemplatesChris Davenport
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magentohainutemicute
 

Similaire à 7 Theming in Drupal (20)

SynapseIndia drupal presentation on drupal best practices
SynapseIndia drupal  presentation on drupal best practicesSynapseIndia drupal  presentation on drupal best practices
SynapseIndia drupal presentation on drupal best practices
 
Drupal 7 install with modules and themes
Drupal 7 install with modules and themesDrupal 7 install with modules and themes
Drupal 7 install with modules and themes
 
Drupal theme development
Drupal theme developmentDrupal theme development
Drupal theme development
 
Drupal Theme Development
Drupal Theme DevelopmentDrupal Theme Development
Drupal Theme Development
 
Drupal
DrupalDrupal
Drupal
 
Design to Theme @ CMSExpo
Design to Theme @ CMSExpoDesign to Theme @ CMSExpo
Design to Theme @ CMSExpo
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
 
Demystifying drupal 7 theming
Demystifying drupal 7 themingDemystifying drupal 7 theming
Demystifying drupal 7 theming
 
Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8
 
Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend development
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend development
 
Drupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsDrupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal Concepts
 
Adopt or hack - how to hack a theme in a Drupal way
Adopt or hack - how to hack a theme in a Drupal wayAdopt or hack - how to hack a theme in a Drupal way
Adopt or hack - how to hack a theme in a Drupal way
 
Building Drupal 6 Theme
Building Drupal 6 ThemeBuilding Drupal 6 Theme
Building Drupal 6 Theme
 
Joomla Templates101
Joomla Templates101Joomla Templates101
Joomla Templates101
 
Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010Intro to Theming Drupal, FOSSLC Summer Camp 2010
Intro to Theming Drupal, FOSSLC Summer Camp 2010
 
Joomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic TemplatesJoomla! Day UK 2009 Basic Templates
Joomla! Day UK 2009 Basic Templates
 
Joomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic TemplatesJoomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic Templates
 
Creating a basic joomla
Creating a basic joomlaCreating a basic joomla
Creating a basic joomla
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magento
 

Plus de Wingston

OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012Wingston
 
05 content providers - Android
05   content providers - Android05   content providers - Android
05 content providers - AndroidWingston
 
04 activities - Android
04   activities - Android04   activities - Android
04 activities - AndroidWingston
 
03 layouts & ui design - Android
03   layouts & ui design - Android03   layouts & ui design - Android
03 layouts & ui design - AndroidWingston
 
02 hello world - Android
02   hello world - Android02   hello world - Android
02 hello world - AndroidWingston
 
01 introduction & setup - Android
01   introduction & setup - Android01   introduction & setup - Android
01 introduction & setup - AndroidWingston
 
OpenCV with android
OpenCV with androidOpenCV with android
OpenCV with androidWingston
 
C game programming - SDL
C game programming - SDLC game programming - SDL
C game programming - SDLWingston
 
C programming - Pointers
C programming - PointersC programming - Pointers
C programming - PointersWingston
 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02Wingston
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01Wingston
 
Linux – an introduction
Linux – an introductionLinux – an introduction
Linux – an introductionWingston
 
Embedded linux
Embedded linuxEmbedded linux
Embedded linuxWingston
 
04 Arduino Peripheral Interfacing
04   Arduino Peripheral Interfacing04   Arduino Peripheral Interfacing
04 Arduino Peripheral InterfacingWingston
 
03 analogue anrduino fundamentals
03   analogue anrduino fundamentals03   analogue anrduino fundamentals
03 analogue anrduino fundamentalsWingston
 
02 General Purpose Input - Output on the Arduino
02   General Purpose Input -  Output on the Arduino02   General Purpose Input -  Output on the Arduino
02 General Purpose Input - Output on the ArduinoWingston
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the ArduinoWingston
 
4.content mgmt
4.content mgmt4.content mgmt
4.content mgmtWingston
 
8 Web Practices for Drupal
8  Web Practices for Drupal8  Web Practices for Drupal
8 Web Practices for DrupalWingston
 
6 Special Howtos for Drupal
6 Special Howtos for Drupal6 Special Howtos for Drupal
6 Special Howtos for DrupalWingston
 

Plus de Wingston (20)

OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012
 
05 content providers - Android
05   content providers - Android05   content providers - Android
05 content providers - Android
 
04 activities - Android
04   activities - Android04   activities - Android
04 activities - Android
 
03 layouts & ui design - Android
03   layouts & ui design - Android03   layouts & ui design - Android
03 layouts & ui design - Android
 
02 hello world - Android
02   hello world - Android02   hello world - Android
02 hello world - Android
 
01 introduction & setup - Android
01   introduction & setup - Android01   introduction & setup - Android
01 introduction & setup - Android
 
OpenCV with android
OpenCV with androidOpenCV with android
OpenCV with android
 
C game programming - SDL
C game programming - SDLC game programming - SDL
C game programming - SDL
 
C programming - Pointers
C programming - PointersC programming - Pointers
C programming - Pointers
 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01
 
Linux – an introduction
Linux – an introductionLinux – an introduction
Linux – an introduction
 
Embedded linux
Embedded linuxEmbedded linux
Embedded linux
 
04 Arduino Peripheral Interfacing
04   Arduino Peripheral Interfacing04   Arduino Peripheral Interfacing
04 Arduino Peripheral Interfacing
 
03 analogue anrduino fundamentals
03   analogue anrduino fundamentals03   analogue anrduino fundamentals
03 analogue anrduino fundamentals
 
02 General Purpose Input - Output on the Arduino
02   General Purpose Input -  Output on the Arduino02   General Purpose Input -  Output on the Arduino
02 General Purpose Input - Output on the Arduino
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
 
4.content mgmt
4.content mgmt4.content mgmt
4.content mgmt
 
8 Web Practices for Drupal
8  Web Practices for Drupal8  Web Practices for Drupal
8 Web Practices for Drupal
 
6 Special Howtos for Drupal
6 Special Howtos for Drupal6 Special Howtos for Drupal
6 Special Howtos for Drupal
 

7 Theming in Drupal

  • 1. Drupal theming Wilson Wingston Sharon wingston.sharon@gmail.com
  • 2. When you access a Drupal website, what you see on the screen is the result of the site's active theme files. As the theme files call the data, the files also set the styling, position, and placement of the content on your screen.
  • 3. How a CMS functions - again Text and pointers to other kinds of content are stored in the database; that data is then dynamically retrieved, composed, and presented to a user in response to a request sent from a web browser. Drupal functions with the themes playing the crucial role in the formatting and presentation of the contents
  • 4.
  • 5. Remember 1. You Can Theme It All The Drupal system allows you to specify different page templates for different purposes on your site. 2. Build with Blocks The process of activating modules and assigning blocks to regions on the pages is one of the most basic and most important skills Each of the blocks in the system, whether created by modules or manually created by the system administrator, can be themed individually, if you so desire. 3. Intercept and Override
  • 6. Intercept and override several opportunities for you to affect the output prior to the data's arrival fron DB on the viewer's screen. The best practice approach to customizing themes involves intercepting and overriding files and styles—not altering the core. By choosing to affect the system's output at the highest levels of Drupal's processes, we leave the core in a purer state.
  • 7. Files making up a theme block.tpl.php – Defines the appearance of the blocks on the page. box.tpl.php – Defines a specific format—a box used to frame things (like comments in the Bluemarine theme). comment.tpl.php – Defines the appearance of the comments which follow items. logo.png – An image file containing the logo used in the theme. node.tpl.php – Defines the appearance of the nodes. page.tpl.php – This is the primary theme file. style.css – The style sheet for this theme.
  • 8. Finding Themes online Go to drupal.org themes section and download themes for your drupal version. Do not use conflicting versions. Eg for drupal 6.x versions, download themes with 6.x in the file name. Do not use alpha versions. Use beta ones at your own risk. Download your theme. You’ll get it usually as a tar.gz
  • 9. Setting up themes Remember the sites/all/modules folder where we put the downloaded modules? Go to c:/wamp/www/mysite/sites/all and make a folder called themes. Extract your theme into that folder. Go to administer>>themes Click the radio box for default on theme you like and click ok.
  • 10. configure Click the configure link, make sure you are on global settings. Here, you can set up theme options for all themes you might have. These override individual theme options. Now click on the theme links you see, all enabled themes show up as a link and you can give them individual settings too. Some themes have a lot of individual settings that you can exploit.
  • 11. Zen Zen is the ultimate starting theme for Drupal. If you are building your own standards-compliant theme, you will find it much easier to start with Zen Support: Providing or receiving support for any theme you develop in Drupal’s normal support forums can be difficult. Bug fixes & updates: Occasionally there will be bugs found in Zen core. If you have modified any of Zen’s core files, it will be difficult for you to incorporate any of those bug fixes into your modified version of Zen.
  • 12. Theming trick –Create a custom user login bar Display a compact, nice user login form that can fit in one line. Once user is logged in, It will display a welcome message and a couple of helpful links. We’ll do this in the garland theme. So go to admin>>themes and move back to garland. Garland files will be in c:..ysitehemesarland
  • 13. Approach Drupal is very powerful, it's so flexible that you have many ways to do things. That's why a 5 minutes of thinking is very recommended before we get our hands dirty. a separate function, call it garland_user_bar(). It decide, and return HTML for the login form, or the welcome message. page.tpl.php, we will place a call to this function somewhere where it gets displayed in the top. Now we have the logic, after that we will write some CSS to style it, to change how it looks
  • 14. Open the folder styling files. You can copy paste code from here to where I tell you. First open the page.tpl.php from garland root theme folder. Add <div id="navigation"><?php print garland_user_bar() ?></div> from 1. page.tpl.code on line 16, just under the body tag. Save and close.
  • 15. Adding the php function Open themes/garland/template.php Append the contents of 2.template.php.txt I provided to the end of this file. function garland_user_bar() {  global $user;                                                                  $output = '';  if (!$user->uid) {                                                               $output .= drupal_get_form('user_login_block');                              }                                                                              else {                                                                           $output .= t('<p class="user-info">Hi !user, welcome back.</p>', array('!user' => theme('username', $user)));       $output .= theme('item_list', array(      l(t('Your account'), 'user/'.$user->uid, array('title' => t('Edit your account'))),      l(t('Sign out'), 'logout')));  }      $output = '<div id="user-bar">'.$output.'</div>';  return $output;}
  • 16. styling Open themes/garland/page.tpl.php Add contents of “3.stylecode.txt” after line 15, before the </head tag. <style type="text/css" media="all">@import "<?php print base_path() . path_to_theme() ?>/user_bar.css";</style> Copy user_bar.css into the garland theme root.