As we've been always talking about Blogger and blogging, today we're going to make a long discussion on one of the most popular question asked blogger.com users that
how to create a blogger template. Many bloggers have asked me this question on Facebook and through other contact services so I thought why not should I make a long post specially for them. Basically, This thing come in
Web Design and Development so a person must have these skills in order to
create blogger template otherwise reading and understanding this long article will be wasted. Today, I'll not take your too much time in this kind of discussion so let's start discussing about the main topic.
Requirements To Create a Blogger Template
First of all, I would like to mention the requirements which everyone should have fordesigning or creating blogger template because any common man can't easily make blogger templates it needs several skills. The first thing is that, you should know Blogger.com perfectly. How to create blog, making posts and pages, doing little customization, playing with gadgets and also how this platform actually works. After this, The basic knowledge of web design required in which HTML and CSS are most important. In blogger, We can use HTML, CSS, XML and JavaScript. If you know all these languages then you'll not face any problem in designing professional blogger template.
Step 1. Preparing Testing/Demo Blog For Creating Template
It is common thing that before creating any blogger template you'll make the demo blog for that template. So, create a blog and publish more than 10+ posts on it. There should be one image, all heading, 4-5 text paragraphs, numbered list, bullet list and quote in every post. We'll design these each and every thing so make 10+ posts with these all things and also integrate some important widgets in footer or sidebar. After that, you can use any default template on it but soon we'll remove it and design another template on it.
Step 2. Understanding Basic Structure Of Blogger Template
Before starting the template we should understand the basic structure of blogger template. We can also say that we're going to create simple empty page of blogger template. So, I've prepare the basic coding which will help you to understand basic structure.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<b:include data='blog' name='all-head-content'/>
<title>
<b:if cond='data:blog.pageType == "index"'>
<data:blog.pageTitle/>
<b:else/>
<b:if cond='data:blog.pageType != "error_page"'>
<data:blog.pageName/> | <data:blog.title/>
<b:else/>
Page Not Found | <data:blog.title/>
</b:if>
</b:if>
</title>
<b:skin><![CDATA[
body {
background:white;
color:black;
}
#Navbar1 {dispaly:none!important;}
]]></b:skin>
</head>
<body>
<b:section class='navbar' id='navbar' maxwidgets='1' showaddelement='no'>
<b:widget id='Navbar1' locked='true' title='Navbar' type='Navbar'/>
</b:section>
</body>
</html>
In the above basic coding, you'll see that there are XML and HTML tags in the starting which means that this is built with XML and HTML. The main extension for this coding will be .XML. If you copy the above coding and paste it with the whole coding of a template then it will be saved and will show nothing on blog because this is simple blank HTML page. Let's understand the basic structure.
1. XML and HTML tags : As I already told you that XML and HTML tags are the main tags in which whole template will be stored. If we want to save this template in computer then we'll choose .XML extension while saving because blogger supports only .XML file templates.
2. Long <title> Coding : If you look in the title code below
<head> you'll see long coding between <title> tag. Basically, That is customized title coding which has many benefits. We've used conditional tags to customize this title coding. The first condition tells that if someone opens the homepage or index main page then it will write the blog title as title of the webpage. Second condition is to show the post or page title first and show blog title after post or page title. In the last, there is 404 error page title coding.
3. <b:skin> Tag For Storing Stylesheet : There is additional built in tag for blogger templates to use
<b:skin> tag with CDATA for storing the whole CSS or stylesheet of the blog. In these tags, you'll only see CSS which is being used in the whole blog. So, every CSS which you'll write should be placed in these tags.
4. <b:section> Tags For Widgets : In blogger, we use these tags to create widgets. Most important things like Blog Title and Content are done by implementing widgets in templates. In short, There are default widgets which are for Header and Blog Content which we use while creating template. For creating widgets, we should cover them with
<b:section> tags which will help us to prepare layout page.
Step 3. Creating Header
After learning the basic structure, let's get started by creating header of blog. Basically, There are only two important things to create a blogger template. First one is Header and second one is Blog Content. Other things are also important but these are most ones. We'll use custom Header widget and will customize it according to our needs. Basically, Header is a widget and you know for creating widget, we should create section for a single or multiple widgets. Copy the code below and paste it anywhere in the <body> of template where you want to display Header widget.
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
<b:widget id='Header1' locked='true' title='' type='Header'></b:widget>
</b:section>
The above coding is not complete coding of Header but when you'll integrate the above coding in template then it will automatically become longer. Save this template, reload the Edit HTML page and you'll see expand arrow in the left side of <b:widget> tag. Blogger will automatically write the default coding on it. So, let's understand this header coding.
1. <b:section> having class='header' and id='header' : First of all, in the section tag, you'll see class='header' and id='header' which are common CSS class and id tags. So, by the help of these tags, you can do customization of header like giving specific width, height, margin, padding, font size, color etc to the header section only.
2. <b:section> having maxwidgets='1' : I don't need to explain these simple things, but for totally newbies I'll explain it. There is another XML tag of blogger which is
maxwidgets='1' by this, we can simply set the number of maximum widgets in that section just replacing the number 1.
3. <b:section> having showaddelement='no' : This is just another simple tag by which we can disable or enable the Add a Gadget option.
4. <b:widget> having id='Header1' : In the header widget, there is CSS id tag by which we customize the header widget with CSS.
5. <b:widget> having locked='true' : This tag allows you to lock and unlock widgets easily by choosing true or false. When the widget is locked, one can't easily edit that through layout page.
The current settings for this header widget and section are fine so we'll not edit them. Below, I'm going to give you class and ID CSS tags which will help you to customize header widget. Simply, add this below CSS between
<b:skin> tag and fill them with your own properties.
I forgot to mention the pages menu widget which is also important for creating menu. That kind of menu only displays the those links which are actually pages made in blogger blog. In default blogger templates, it's mostly used so here I'm going to teach you how can we implement them in our blogs. I'll just give you default XML and HTML coding and will show you way to design that with CSS. If you're well known with HTML and CSS then you can easily make custom menu there anywhere in the template. But for this pages menu, you might face problem. Let's get started.
This pages menu widget is also done by creating widget section and widget. So, below I'm going to give you another code which will be having section tags and there will be page list widget which is the main thing. Just put the below coding anywhere where you want to show up that pages menu widget.