Tuesday

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>


final result


<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
.



Digg Technorati del.icio.us Stumbleupon Reddit
feedburner

Every New lesson , directly to your Mail Box .....

0 comments:

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

The Word Validation image has been removed and no need to Sign In. So don't be lazy ..........

 
This blog sucks under Internet Explorer.

Buy me a Coffee


Powered By

Latest Site News


Animated 3D Dock removed in order to speed up loading time and to help IE users.

This site will be come up with a DOMAIN name soon.

Link and Win competition will start as soon as the Domain name added. Join with us. You could be the winner.

Site Info

since 2009 April

Vote

Vote to My site to be nominated for Best Geek Blog!

Submit a Lesson

Visitors

of Visitors read Pages.

Lessons by DragonD | Template by Simran | Logo by lahirulcd | Temaplate redesigned by DragonD| Icons by DryIcons.com | Licensed under CC license Creative Commons License