Sunday, January 5, 2014

Widgets

How To Make Separate Label Or Archive Page On Blogger

How To Make Separate Label / Tag Or Archive Page On Blogger / Blogspot


1. Make a new page. Give it title label / tag / archive or anything you like.
2. Go to Layout. Add a Gadget. Choose label widget or archive widget. Drag it to below the Blog Posts.

Separate Label Or Archive Page On Blogger
3. Go to Template tab and make a backup of your template.
4. Click Edit HTML.
5. For label widget, find code

<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'></b:includable>

The “…” is the part where the label gadget snippet lies. We don’t need that part of snippets.
6.  After <b:includable id='main'> add:

<b:if cond='data:blog.url == &quot;URL of the page&quot;'>

And before </b:includable> add:

</b:if>

You only need to change the URL to the page with yours that you have previously created. This is a conditional tag that will tell the browsers that your gadget should be shown when a visitor of you blog visits that URL only.
The code will look like this:

<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:blog.url == &quot;URL of the page&quot;'></b:if>
</b:includable>

7. For archive widget, find code:

<b:includable id='main'>
    <b:if cond='data:title'>
    <h2><data:title/></h2>
  </b:if>
  <div class='widget-content'>
  <div id='ArchiveList'>
…
…
</b:includable>

Now same as the label gadget, add the conditional tags. The snippet will be:

<b:includable id='main'>
 <b:if cond='data:blog.url == &quot;URL of the page&quot;'>
    <b:if cond='data:title'>
    <h2><data:title/></h2>
  </b:if>
  <div class='widget-content'>
  <div id='ArchiveList'>
…
…
</b:if>
</b:includable>

8. Save template.

No comments:

Post a Comment