twitter
    Find out what I'm doing, Follow Me :)

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.

0 comments:

Post a Comment