Blog Help
  Home arrow Blog Help arrow Page 2 - Setting a Static Front or Main Page in Blogge...
Affiliate Promotion  
Blog Help  
Domain Name Tips  
How To  
Newsletter Marketing  
Online Business Help  
Search Engine Tricks  
Web Development  
Web Hosting  
Website Advertising  
Website Content  
Website Marketing  
 Webmaster Tools
 
Base64 Encoding 
Browser Settings 
CSS Coder 
CSS Navigation Menu 
Datetime Converter 
DHTML Tooltip 
Dig Utility 
DNS Utility 
Dropdown Menu 
Fetch Content 
Fetch Header 
Floating Layer 
htaccess Generator 
HTML to PHP 
HTML Encoder 
HTML Entities 
IP Convert 
Meta Tags 
Password Encryption
 
Password Strength
 
Pattern Extractor 
Ping Utility 
Pop-Up Window 
Regex Extractor 
Regex Match 
Scrollbar Color 
Source Viewer 
Syntax Highlighting 
URL Encoding 
Web Safe Colors 
Whois
 
Forums Sitemap 
Mobile Linux 
APP Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BLOG HELP

Setting a Static Front or Main Page in Blogger
By: Codex-M
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2009-04-20

    Table of Contents:
  • Setting a Static Front or Main Page in Blogger
  • Google Classic Blogger Template Structure and Code
  • Formulating the Code to Edit the Template
  • Implementation and Testing of the Code

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Setting a Static Front or Main Page in Blogger - Google Classic Blogger Template Structure and Code


    (Page 2 of 4 )

    The Classic Blogger template is dynamically driven. There is only one file that controls all of the pages. This is called a "template." If you are using Classic, you can access the template file by navigating to Google Blogger control panel then Dashboard and click "Template." The source code inside the template controls the creation of pages in Blogger. We will edit this template in such a way it will able to provide static home page content.

    There are basically three important template tags that we need to learn before we can edit the template. These template tags are conditional tags, such as:


    <MainPage>........... </MainPage>

    <ItemPage>........ </ItemPage>

    <ArchivePage>........</ArchivePage>


    The first tag, <MainPage>........... </MainPage>, is used when we need to show or display the content only on the home page/front page. The information contained between these tags will not be shown in the post or archived pages.

    The second tag, <ItemPage>........ </ItemPage>, is used to display information only on the post pages. The content displayed within these tags will not be shown on the main page or front page.

    Finally the third tag, <ArchivePage>........</ArchivePage>, is used to display information only on the archived pages. Content within these tags will not be displayed on the main page or front pages

    Below are the sets of instructions in the default classic template that we will need to alter to display front page content:


    <!-- Begin content -->

    <div id="content">


    <!-- Begin main column -->

    <div id="main">


    <Blogger>


    <BlogDateHeader>

    <h2 class="date-header"><$BlogDateHeaderDate$></h2>

    </BlogDateHeader>

     

     

    <!-- Begin .post -->

    <div class="post"><a name="<$BlogItemNumber$>"></a>

     

    <BlogItemTitle>

    <h3 class="post-title">

    <BlogItemUrl><a href="<$BlogItemUrl$>" title="external link"></BlogItemUrl>

    <$BlogItemTitle$>

    <BlogItemUrl></a></BlogItemUrl>

    </h3>

    </BlogItemTitle>

     

    <div class="post-body">

    <p>

    <$BlogItemBody$>

    </p>

    </div>

     

    <p class="post-footer">

    <em><$I18NPostedByAuthorNickname$> @ <a href="<$BlogItemPermalinkUrl$>" title="permanent link"><$BlogItemDateTime$></a></em>

    <MainOrArchivePage><BlogItemCommentsEnabled>

    <a class="comment-link" href="<$BlogItemCommentCreate$>"<$BlogItemCommentFormOnclick$>><span style="text-transform:lowercase"><$I18NNumComments$></span></a>

    </BlogItemCommentsEnabled><BlogItemBacklinksEnabled>

    <a class="comment-link" href="<$BlogItemPermalinkUrl$>#links"><span style="text-transform:lowercase"><$I18NLinksToThisPost$></span></a>

    </BlogItemBacklinksEnabled>

    </MainOrArchivePage> <$BlogItemControl$>

    </p>

     

    </div>

    <!-- End .post -->


    Above is a particular section of the Blogger template that deals with the post or content. The next important section is this one:


    <div class="post-body">

    <div>

    <$BlogItemBody$>

    </div>

    </div>


    The above code is for an html table (div) that displays the actual content written by the author. Another template tag that is important:


    <$BlogItemBody$>


    This is a command in Blogger that returns the content of the post. Also:


    <BlogDateHeader>

    <h2 class="date-header"><$BlogDateHeaderDate$></h2>

    </BlogDateHeader>


    The above deals with displaying the dates of the post somewhere near the title.


    <BlogItemTitle>

    <h3 class="post-title">

    <BlogItemUrl><a href="<$BlogItemUrl$>" title="external link"></BlogItemUrl>

    <$BlogItemTitle$>

    <BlogItemUrl></a></BlogItemUrl>

    </h3>

    </BlogItemTitle>


    The above section deals with displaying post titles in H3 tag above the post body.

    Using the above principles of template tags, we can formulate our changes as follows:


    1. We will use the <MainPage>........... </MainPage> to set a condition for some particular content to show only on the main page (home page). If the visitor clicks the post page, the post content will be shown, not the main page content.

    2. The main page content is not post content, so it won't show in the post sidebar to display the title.

    3. The post content is independent of the main content; if a new post is created, it will not be shown in the main page. Instead it will be shown only in the sidebar.

    4. The archived pages simply show a link to the articles written on that specified date. This is very useful for making all post pages as crawlable as possible in search engines. The primary reason is that Blogger will only display the 10 most recent posts in the sidebar; posts beyond that will not be shown.

    5. We will not show the post title and footer in the home page, as it is immaterial. The home page content is meant to be static and will not need a blog date, post title and post footer information.

    More Blog Help Articles
    More By Codex-M


     

       

    BLOG HELP ARTICLES

    - Create a Vlog
    - Creating a Personal Blog People Actually Wan...
    - Offline Blog Managers
    - Get More from WordPress
    - Improving Blogspot Traffic with Free Google ...
    - LiveJournal: Blogs for All
    - WordPress Security Tips
    - Blogging with Yahoo
    - Sell Songs Online Safely Through Your Blog
    - Are E-Zines Still Relevant?
    - Rewriting URLs and Doing WordPress Redirects...
    - Build a Better Blog
    - Setting a Static Front or Main Page in Blogg...
    - Maximize Crawlability of WordPress Blogs and...
    - Create a Blogging Site

     
    Create the Optimal Architecture for your Critical Applications
    Warburton's the largest independently owned bakery in the UK faced a number of d....

     
    Five Best Practices for Deploying a Successful Service-Oriented Architecture
    This white paper describes the benefits you can expect with SOA, and how IBM can....

     
    Gartner Magic Quadrant for Application Delivery Controllers
    Gartner summarizes its view on Application Delivery Controllers, evaluates stren....

     
    Knowledge is Power
    What you don't know can hurt you, and is likely costing you money and increasing....

     
    Rationalizing the Multi-Tool Environment
    The rationalized multi-tool approach is flexible, scalable and cost effective. I....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek