Templating

A new feature in Blog Writer (version 0.9.x) is Preview Templates. Enabling templates on the Preview allows you to see what your final post might look like once posted to your Blog. The template support in the beta version allows you to associate one Preview Template per Blog. Editing of templates is not currently supported.

Sample screen shots of the Preview Template based on the same post:

How to Enable a Template for your Blog

Blog Writer supports a single template per Blog. To enable templating, you must first download or import a template and associate it with a Blog account. Once you have associated a template, check the Enable Template check box.

  1. Switch to the Preview tab.
  2. Click on the Select Template button located at the top of the Preview pane. This will pop up a dialog box with all your Blogs listed.
  3. Pick the appropriate Blog from this list and choose Download. Note: You must be connected to the Internet to do this. This process may take a few minutes.
  4. After the download has completed, select the template by clicking on the Template (Blog) name.

Note: Blogger.com templates are based on the current template you are using on your Blog. The Preview Template for Typepad is based on the current CSS styles used in your Typepad account. The Typepad template does not display the full layout, e.g: 2-column, 3-column, etc. We recomend that MovableType (and Custom Atom API) users create and import their own template (see below).

Creating and Importing your own Custom Template

You may want to create and import your own template if the automatically downloaded template is not accurate. If you used the Download template feature and the template has non-western characters, then we recomend you import your template as well.

The Blog Writer template format is a simple XHTML file with <BlogWriterBlogTitle/>, <BlogWriterPostTitle/>, and <BlogWriterPostBody/> tags. The only required tag is <BlogWriterPostBody/>. When processing the template, Blog Writer replaces these tags with the appropriate content. For example, the Blog title is placed for <BlogWriterBlogTitle/>, the <BlogWriterPostBody/> is replaced with the post title, and the <BlogWriterPostBody/> is replaced with your post body content.

(A sample template using these tags can be found at the end of this page.)

  1. Create and edit your template html using a text editor such as Notepad.
  2. Insert the Blog Writer template tags - <BlogWriterBlogTitle/>, <BlogWriterPostTitle/>, and <BlogWriterPostBody/> per your design.
  3. Save the template in a format that supports International character sets (UTF-8 encoding). For example, using Notepad, on the File-Save-As dialog, choose UTF-8 as the Encoding. This step is very important.
  4. From the Blog Writer Select Templates dialog box, choose Import and point to the file you had saved in the previous step.

Note: Blogger.com users can also copy a template from Blogger.com's Dashboard control panel. Simply select the template content (Ctrl+A) from your control panel, and copy and paste it into Notepad. Then save this (using UTF-8 encoding). Finally, import the saved file. You do not have to insert Blog Writer template tags for Blogger templates. We recommend this method if your template uses non-western character sets.

Our forum has a tip on how to manually create a template using WordPress as an example.

Example Template Format

<html>
   <head>
      <title></title>
      <!-- define your own css styles
              using inline or linked to an external css style sheet
      -->
   </head>
   <body style="font-face:verdana; padding:10px;
                 font-size:1.0em; background-color:#ffff99" >
      <h2><BlogWriterBlogTitle/></h2>
      <hr/>
      <h3><BlogWriterPostTitle/></h3>
      <div style="margin:20px; padding:10px;
                background-color:#ffffff; border:1px solid #cccccc">
         <BlogWriterPostBody/>
      </div>
</body>
</html>