Creating a new XTemplate
To make a new XTemplate template, create a directory in your Drupal installation at this location:
/themes/
Whatever you name the new directory will be used as the name of your new template, for instance:
/themes/rembrant
Once you create a template in this directory, it will appear on the theme selection page as the "rembrant" template.
The easiest way to create a new template is to make a copy of an existing template, such as Default or Pushbutton, and start making changes to the files.
The only file required in a template directory is xtemplate.xtmpl, which is a regular HTML or XHTML file containing some XTemplate tags that Drupal substitutes with content when a page is served. The xtemplate.xtmpl file can be edited in DreamWeaver, GoLive, BBEdit or any other application you use to work on HTML/XHTML.
All other files in the template are optional, and are linked to from the xtemplate.xtmpl file. These can include CSS, image or JavaScript files, and should all be included in the template directory to make the template easy to maintain and portable between Drupal installations.
Note that if you name your stylesheet style.css, it will automatically be picked up by Drupal, and you will not need to add an explicit @import or <link /> for it. If you make a subdirectory within your template, containing another style.css file, then the subdirectory becomes a new theme, using the XHTML from the first template, but with a different stylesheet.
To make a new XTemplate template, create a directory in your Drupal installation at this location:
/themes/
Whatever you name the new directory will be used as the name of your new template, for instance:
/themes/rembrant
Once you create a template in this directory, it will appear on the theme selection page as the "rembrant" template.
The easiest way to create a new template is to make a copy of an existing template, such as Default or Pushbutton, and start making changes to the files.
The only file required in a template directory is xtemplate.xtmpl, which is a regular HTML or XHTML file containing some XTemplate tags that Drupal substitutes with content when a page is served. The xtemplate.xtmpl file can be edited in DreamWeaver, GoLive, BBEdit or any other application you use to work on HTML/XHTML.
All other files in the template are optional, and are linked to from the xtemplate.xtmpl file. These can include CSS, image or JavaScript files, and should all be included in the template directory to make the template easy to maintain and portable between Drupal installations.
Note that if you name your stylesheet style.css, it will automatically be picked up by Drupal, and you will not need to add an explicit @import or <link /> for it. If you make a subdirectory within your template, containing another style.css file, then the subdirectory becomes a new theme, using the XHTML from the first template, but with a different stylesheet.
