Sunday, January 16, 2011

Use Drop-down Menu For Blogger's Labels

2 comments

If you use blogger (blogspot.com) and have a lot of labels, then you really need to display your labels in a drop-down menu. This option is not default in Blogger, but easily achievable.

To customize your labels widget in Blogger to be displayed as a drop-down menu
:

1. First, make a backup just in case. To do so, go to your Blogger Dashboard, Layout > Edit HTML > Download Full Template

2. Go to Layout > Edit HTML in your Blogger dashboard. This time, do notcheck the "Expand Widget Templates" checkbox!
3. Search for the following code (it doesn't have to be exactly like this, for my blog for instance, Label1 is called Label12):




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

4. Replace the above code, with this:


<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
<br/>

<select onchange='location=this.options[this.selectedIndex].value;' style='width:200px'>
<option>Labels</option>
<b:loop values='data:labels' var='label'>
<option expr:value='data:label.url'><data:label.name/>
</option>
</b:loop>
</select>

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


Now click Save Template

2 comments:

Post a Comment

Followers

Blogumulus by Roy Tanck and Amanda Fazani
Free Blogger Tips, Hacks, Widgets, Templates and more