The pages widget on Blogger is very useful for use as menu, however, it has a weakness: you can’t add links directly from the panel, but this is possible from the code.
Step by step:
1. Go to your template code (Desktop → Design → Edit HTML) and expand widget templates.
2. Search the pages widget code, it looks more or less as follows:
<b:widget id='PageList1' locked='true' title='Pages' type='PageList'>
<b:includable id='main'>
<b:if cond='data:title'><h2><data:title/></h2></b:if>
<div class='widget-content'>
<ul>
<b:loop values='data:links' var='link'>
<b:if cond='data:link.isCurrentPage'>
<li class='selected'><a expr:href='data:link.href'><data:link.title/></a></li>
<b:else/>
<li><a expr:href='data:link.href'><data:link.title/></a></li>
</b:if>
</b:loop>
</ul>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
To facilitate the search, can search with your browser: id = ‘PageList
3. Once you locate the code, there are two places where you can put new links:
- Before
<ul>
. The link will be the first one in the menu. - After
</ul>
. The link will be the last one in the menu.
As this is an HTML list, the link will follow this format:
<li><a href='http://mysite.com/mylink/'>My link</a></li>
You can add as many links as the design permits. Always taking care of opening and closing tags correctly.
4. Save the changes.
In this way you can add links to a important label, an external site, the feed url or any other link.
Diane April 6, 2011 at 9:53 pm
Thank you so much! I have been trying to figure this out FOREVER! none of the other tutorials were working!
Noisy Quiet May 18, 2011 at 5:04 pm
Nice! Thank you 🙂
Quick correction. I think you meant to say insert the link after ul or before /ul. You have that reversed in your directions.
John June 11, 2011 at 4:24 pm
I followed your instructions but am a little confused now. I’m brand new at this so bare with me. Now, how do I link the category/page links to the posts? Right now if you click on the page link it says page does not exist. I’ve tried numerous ways. I also entered a url under the post heading. That does nothing. I’m not even sure why that is there. Could you help me link my post to the correct category heading? Feel free to give me any constructive criticism on the layout, etc.
Thanks
kingsley April 11, 2012 at 5:07 am
thanks for ur information
Keith February 6, 2013 at 2:08 am
Thank you for your help.I got what I looked for.