twitter
    Find out what I'm doing, Follow Me :)
Showing posts with label Labels. Show all posts
Showing posts with label Labels. Show all posts

Showing gadgets in selected pages

All right , now we are stepping to some serious business.Hope you all know about adding a gadget by the layout page. Lets take 'Labels' gadget as a example.



Now lets say you want to show this gadget , labels only in my home page. Then

1. Edit your template ( How to edit your template )
2. Press Ctrl+F and search for
<b:widget id


Now you will out many code lines which are starting from ,and finaly you will see a code line similar to <b:widget id='Label1' locked='false' title='Labels' type='Label'>

just below that you will see a code line as
<b:includable id='main'>

Just paste this single code line below that line <b:if cond='data:blog.homepageUrl == data:blog.url'>

and scroll down until you find out these 2 code lines ( don't use search , just scroll down )

</div>
</b:includable>

remember , you should find out first </div> code line after <b:includable id='main'>

now paste this line just below </div> and above </b:includable>

</b:if>



<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:blog.homepageUrl == data:blog.url'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
<ul>
<b:loop values='data:labels' var='label'>
<li>
<b:if cond='data:blog.url == data:label.url'>
<span expr:dir='data:blog.languageDirection'>
<data:label.name/>
</span>
<b:else/>
<a expr:dir='data:blog.languageDirection' expr:href='data:label.url'>
<data:label.name/>
</a>
</b:if>
<span dir='ltr'/>
</li>
</b:loop>
</ul>

<b:include name='quickedit'/>
</div>
</b:if>
</b:includable>
</b:widget>


Remember , you may have some what different code lines than the above

Now follow the Safety Saving Steps.

And



If you want to apply this trick to your other gadgets too , just search under term <b:widget id and you will find plenty of gadgets.

Removing Label Number Count

When you add the Label gadget , you will able to see the number of labels , in front of the name of the label. Some times , these numbering makes your label gadget some what ugly. And if you have only one tag for certain tag , that reduce your points too.

ex:-


Here is the way to remove that ,

1. Edit your Template
2. Press Ctrl+F and find out data:label.count

Now you will find out some code lines similar to

<data:label.name/>
<b:else/>
<a expr:href='data:label.url'><data:label.name/></a>
</b:if>
(<data:label.count/>)
</li>


Remove this code line

(<data:label.count/>)

Now follow the Safety Saving Steps.

And

Now you are done.


Changing the word ' Labels '

You may have seen the name Labels and bunch of labels that you have given to your post , below or above your post.Don't you feel that it is classic and common ? So , what about a name like My Topics , Categories or some thing like that ?







For that ,


1. Edit your template ( How to edit your template )
2. Press 'Ctrl' key and 'F' and Find out
data:postLabelsLabel


Now you will find some code lines similar to

<span class='post-labels'>
<b:if cond='data:post.labels'>
<data:postLabelsLabel/>
<b:loop values='data:post.labels' var='label'>
<a expr:href='data:label.url' rel='tag'>


<data:postLabelsLabel/> , This line stands for the word 'Labels'. Change this word to any thing you like to

ex-

<span class='post-labels'>
<b:if cond='data:post.labels'>
Topics
<b:loop values='data:post.labels' var='label'>
<a expr:href='data:label.url' rel='tag'>



Now follow the Safety Saving Steps.

And