An easy way to add navigation tabs in Blogger is using a Pages gadget. However, as the name implies, there is a shortcoming -the tabs only link to static pages.
Does that mean you should forget about adding tabs linking pages other than static pages? No, definitely not….because there is always a workaround.
Use the hack below to add tabs that link to any URLs. You can add tabs linking to label pages, individual post pages, website or whatever.
Here’s how:
- Go to Dashboard > Design > Edit HTML.
- Tick the Expand Widget Templates check box on top right of the HTML window.
- Look for Pages gadget code, like this:
01<b:widgetid='PageList1'locked='false'title='Pages'type='PageList'>02<b:includableid='main'>03<b:ifcond='data:title'><h2><data:title/>h2>b:if>04<divclass='widget-content'>05<ul>06<b:loopvalues='data:links'var='link'>07<b:ifcond='data:link.isCurrentPage'>08<liclass='selected'><aexpr:href='data:link.href'><data:link.title/>a>li>09<b:else/>10<li><aexpr:href='data:link.href'><data:link.title/>a>li>11b:if>12b:loop>13PUT THE CODE FOR THE LINKS HERE14ul>15<b:includename='quickedit'/>16div>17b:includable>18b:widget> - Put the code for the additional links right after
as indicated in line 13.
Each link shall be in this format:
where<li><ahref="YourLink">YourLinkTexta>li>YourLinkis an URL andYourLinkTextis the text you would like to appear on the tab.
To make the link open in a new window or tab, addtarget="_blank"attribute right afterhref="YourLink".
- Preview before saving.
- Enjoy!
No comments:
Post a Comment