Blogger Template Designing Part 2

Introduction:

In the previous post we learned about some great tags that used in Blogger for designing Blogger Templates such as <b:skin>, <b:widget>, <b:section>, Etc. Today we are going to learn about a new tag that will help to manage our Blogger Title Tag. We know that Blogger Blogs will display Titles in two way's, a static Title for Homepage and Dynamic one for Blog-Posts. We can know that a web page can only run one Title at a time; It will not run Two Titles at a time. So we have to use an (IF) condition on the header of Blogger Template to detect whether the visitor of a blog was on Homepage of the blog or not.

Blogger Template Designing Part 2: Adding of Title Tags:

It is very easy to add Title to a Blogger Template if you know the basic programming concept of (IF). We use (IF) Condition to check whether a condition was true or not.
Example:
set name="Muhsin";
//the variable "name" Now have the value="Muhsin"// 
if(name=="Muhsin")// Checking condition with if
{
print: name was correct // Print if the condition was true
}
else
{
print: name was incorrect //print if the condition was not true
}
Like the following example that I gave above this text, We can use the (IF) condition Tag in Blogger for showing specified title for blog Homepage and Blog-Posts.

Full Code That Defined in The Tutorial Video:

<head>
<b:if cond='data:blog.pageType != &quot;item&quot;'>
<title>MY FIRST</title>
<b:else/>
<title><data:blog.pageName/></title>
</b:if>
 <b:skin><![CDATA[
  ]]></b:skin>
</head>
Here on the above code "<b:if cond='data:blog.pageType != &quot;item&quot;'>" will check whether the user was in blog Homepage or Not. If the user was in Homepage of the blog, then the "MY FIRST" Title Tag will run otherwise it run the "<title><data:blog.pageName/></title>" Tag. The "<data:blog.pageName/>" will display the Title of the blog-post were currently the user was standing.

Use of <data:blog.pageName/> in Blogger Template:

The main use of <data:blog.pageName/> in Blogger Template designing is to show the title of the post were the a visitor of a blog currently standing. By using this Tag, we can show specified Widgets, Images, Videos, Etc for specified Blog-Post or page.

Use of <b:if cond='data:blog.pageType != &quot;item&quot;'> in Blogger Template:

The use of  <b:if cond='data:blog.pageType != &quot;item&quot;'> in Blogger Template is to check wather the current page was Homepage or Not. We can use this Tag for showing Widgets and other scripts runs only in Homepage of Blogger Blog.

Suggested Article for Blogger Template Designers:

  • Blogger Template Designing Part 3: Add of Widget Section
I hope you well understood the matter that I specified through this article If you have any doubts or suggestions related to this article. Please let me know by using the comment box that given below or on my Facebook Page. Thanks

4 comments:

Wapmaster or Webmaster can Comment Us with the following Comment Box . Don't add Links to your site for Spamming our Blog .. Once you add Comment with Link . It will be deleted immediatly by our Admins .

 
Top