Home > Tutorial > How to Customize Links and Tabs on Pages Gadget
How to Customize Links and Tabs on Pages Gadget
Posted on Thursday, October 21, 2010 by android apps market for tablests
This is a quick tutorial on how to customize links and tabs on pages gadget, in case you want to have a tab to link to some other URL instead of your static pages alone (how selfish the current limitation is!). Do note that after this hack, you won't be able to edit your pages gadget directly by clicking on 'Edit' on your Pages Gadget from Page Element. You'd have to code it each time you wanna make changes. So if you have added a new static page, it wont automatically show on your Pages Gadget unless you make the necessary changes.
Make sure you have already added your Pages Gadget before attempting this tutorial.
Update: With the new Blogger interface, you can add external links to your Pages gadget.
Make sure you have already added your Pages Gadget before attempting this tutorial.
Update: With the new Blogger interface, you can add external links to your Pages gadget.
Step 1:
View you blog using Firefox (or any other browser that lets you to view the page source) - Right Click - View Page Source
View you blog using Firefox (or any other browser that lets you to view the page source) - Right Click - View Page Source
Step 3:
This is where you will edit your code. This is the code that I have copied from page source.
If you want additional links to your Pages Gadget, you gotta add more lines to the above code. Say I want my second tab to be linking to my other Blog, and I want the tab to say 'My Other Blog', so my code now looks like this:
This is where you will edit your code. This is the code that I have copied from page source.
<li class="selected"><a href="http://yoboytestblog3.blogspot.com/">Home</a></li>
<li><a href="http://yoboytestblog3.blogspot.com/p/background-1.html">Background 1</a></li>
<li><a href="http://yoboytestblog3.blogspot.com/p/background-2.html">Background 2</a></li>
If you want additional links to your Pages Gadget, you gotta add more lines to the above code. Say I want my second tab to be linking to my other Blog, and I want the tab to say 'My Other Blog', so my code now looks like this:
<li class="selected"><a href="http://yoboytestblog3.blogspot.com/">Home</a></li>
<li><a href="http://www.southernspeakers.blogspot.com/">My Other Blog</a></li>
<li><a href="http://yoboytestblog3.blogspot.com/p/background-1.html">Background 1</a></li>
<li><a href="http://yoboytestblog3.blogspot.com/p/background-2.html">Background 2</a></li>
Step 4:
If you want to retain the highlight feature that your tab has (the tab which is being clicked will be highlighted), do this step. Otherwise, you can skip this step, but you gotta remove the ' class='selected'' part of your code, so that it would similar to other lines in your code.
Note: (skip this paragraph if you are not adding label query to your Pages Gadget) I am sure many of you want to add label search query as a link in the previous step. I must warn you, if you don't care about the highlight feature, this is not a concern. You can add a label query like http://www.southernspeakers.blogspot.com/search/label/Tutorial normally, but if you want the highlight feature to work, your label must end with .html, so your label will be something line Tutorial.html, and your label query page will look something like http://www.southernspeakers.blogspot.com/search/label/Tutorial.htnml . This is just a way to trick blogger to enable the highlight feature. Check out the following tutorial for a detailed walkthrough:
http://southernspeakers.blogspot.com/2010/10/label-sorted-posts-from-menu-bar.html
This is the code that I have after completing the previous step:
I am going to modifiy this code. Modifying is a must to have the highlight feature available. This is the code that I have after modifying it.
Easy, don't panic. The following image will show you exactly what I did to our original code:
If you want to retain the highlight feature that your tab has (the tab which is being clicked will be highlighted), do this step. Otherwise, you can skip this step, but you gotta remove the ' class='selected'' part of your code, so that it would similar to other lines in your code.
Note: (skip this paragraph if you are not adding label query to your Pages Gadget) I am sure many of you want to add label search query as a link in the previous step. I must warn you, if you don't care about the highlight feature, this is not a concern. You can add a label query like http://www.southernspeakers.blogspot.com/search/label/Tutorial normally, but if you want the highlight feature to work, your label must end with .html, so your label will be something line Tutorial.html, and your label query page will look something like http://www.southernspeakers.blogspot.com/search/label/Tutorial.htnml . This is just a way to trick blogger to enable the highlight feature. Check out the following tutorial for a detailed walkthrough:
http://southernspeakers.blogspot.com/2010/10/label-sorted-posts-from-menu-bar.html
This is the code that I have after completing the previous step:
<li class="selected"><a href="http://yoboytestblog3.blogspot.com/">Home</a></li>
<li><a href="http://www.southernspeakers.blogspot.com/">My Other Blog</a></li>
<li><a href="http://yoboytestblog3.blogspot.com/p/background-1.html">Background 1</a></li>
<li><a href="http://yoboytestblog3.blogspot.com/p/background-2.html">Background 2</a></li>
I am going to modifiy this code. Modifying is a must to have the highlight feature available. This is the code that I have after modifying it.
<b:if cond="data:blog.url == "http://yoboytestblog3.blogspot.com/"">
<li class="selected"><a href="http://yoboytestblog3.blogspot.com/">Home</a></li>
<b:else/>
<li><a href="http://yoboytestblog3.blogspot.com/">Home</a></li>
</b:if>
<b:if cond="data:blog.url == "http://www.southernspeakers.blogspot.com/"">
<li class="selected"><a href="http://www.southernspeakers.blogspot.com/">My Other Blog</a></li>
<b:else/>
<li><a href="http://www.southernspeakers.blogspot.com/">My Other Blog</a></li>
</b:if>
<b:if cond="data:blog.url == "http://yoboytestblog3.blogspot.com/p/background-1.html"">
<li class="selected"><a href="http://yoboytestblog3.blogspot.com/p/background-1.html">Background 1</a></li>
<b:else/>
<li><a href="http://yoboytestblog3.blogspot.com/p/background-1.html">Background 1</a></li>
</b:if>
<b:if cond="data:blog.url == "http://yoboytestblog3.blogspot.com/p/background-2.html"">
<li class="selected"><a href="http://yoboytestblog3.blogspot.com/p/background-2.html">Background 2</a></li>
<b:else/>
<li><a href="http://yoboytestblog3.blogspot.com/p/background-2.html">Background 1</a></li>
</b:if>
Easy, don't panic. The following image will show you exactly what I did to our original code:
Step 5:
Now that we have prepared our code, it's time to put it at its place. Please backup your template before doing this. From Dashboard - Design - Edit HTML - Expand Widget Templates - Delete everything between <ul> and </ul>, and place our code there. This is how my portion of the code looks like:
Save Template and there you have it. Happy trying. I can think of lots of reasons why you want to edit your Pages Gadget. But to go through all this trouble is not worth it in my opinion. Always opt to use Link List gadget as a substitute for your Pages Gadget. You can edit links easily. The only thing you will be giving up is the 'highlighted tabs' feature that comes built in with Pages Gadget.
Now that we have prepared our code, it's time to put it at its place. Please backup your template before doing this. From Dashboard - Design - Edit HTML - Expand Widget Templates - Delete everything between <ul> and </ul>, and place our code there. This is how my portion of the code looks like:
<b:section class="tabs" id="crosscol" maxwidgets="1" showaddelement="yes">
<b:widget id="PageList2" locked="false" title="Pages" type="PageList">
<b:includable id="main">
<b:if cond="data:title"><h2>
<data:title></data:title></h2>
</b:if>
<div class="widget-content">
<ul>
<b:if cond="data:blog.url == "http://yoboytestblog3.blogspot.com/"">
<li class="selected"><a href="http://yoboytestblog3.blogspot.com/">Home</a></li>
<b:else/>
<li><a href="http://yoboytestblog3.blogspot.com/">Home</a></li>
</b:if>
<b:if cond="data:blog.url == "http://www.southernspeakers.blogspot.com/"">
<li class="selected"><a href="http://www.southernspeakers.blogspot.com/">My Other Blog</a></li>
<b:else/>
<li><a href="http://www.southernspeakers.blogspot.com/">My Other Blog</a></li>
</b:if>
<b:if cond="data:blog.url == "http://yoboytestblog3.blogspot.com/p/background-1.html"">
<li class="selected"><a href="http://yoboytestblog3.blogspot.com/p/background-1.html">Background 1</a></li>
<b:else/>
<li><a href="http://yoboytestblog3.blogspot.com/p/background-1.html">Background 1</a></li>
</b:if>
<b:if cond="data:blog.url == "http://yoboytestblog3.blogspot.com/p/background-2.html"">
<li class="selected"><a href="http://yoboytestblog3.blogspot.com/p/background-2.html">Background 2</a></li>
<b:else/>
<li><a href="http://yoboytestblog3.blogspot.com/p/background-2.html">Background 1</a></li>
</b:if>
</ul>
<b:include name="quickedit">
</b:include></div>
</b:includable>
</b:widget>
</b:section>
Save Template and there you have it. Happy trying. I can think of lots of reasons why you want to edit your Pages Gadget. But to go through all this trouble is not worth it in my opinion. Always opt to use Link List gadget as a substitute for your Pages Gadget. You can edit links easily. The only thing you will be giving up is the 'highlighted tabs' feature that comes built in with Pages Gadget.
Category Article Tutorial
Powered by Blogger.
Blog Archive
-
▼
2010
(1682)
-
▼
October
(153)
- Info New Offer "HTC T9199" Smartphone Windows Mob...
- Complete info Specification "LG E900 Optimus 7" Wi...
- Amazing Book Blogs Gadget
- Show/Hide Gadgets on a Specific Page
- myTouch 4G specs
- 10? Motorola Tablet Coming with Gingerbread
- Image Too Large When Clicked On
- Motorola Droid X and Droid 2
- Motorola Droid 2 discontinued at Best Buy, two Dro...
- Shopping Amazon with Windowshop app for iPad
- Apple sues Motorola: A look at the complaints | Wi...
- Will HP, Dell, Sony answer 11-inch MacBook Air? | ...
- Apple iPhone Leapfrogs RIM BlackBerry in Smartphon...
- UK MPs question Google over Street View data breaches
- More details on Nexus Two surface
- Samsung SGH-a187 GoPhone - blue (AT&T)
- Find your polling place and follow the US Election...
- Find your polling place and follow the US Election...
- iPad Touchscreen freaks out & screens self-registe...
- How the New MacBook Air, Slate Define Apple and HP
- Price New CDMA Phone "LG 6400" With Wireles FM Su...
- Info Price Offer For New CDMA Phone "LG 6300" With...
- New in Google Maps for Android: Updated reviews, s...
- New in Google Maps for Android: Updated reviews, s...
- New MacBook Air Doesn�t Come With Adobe Flash
- MacBook Air�s Revolutionary New Display
- Bring Your Phone to Work Day: Managing Android Dev...
- Bring Your Phone to Work Day: Managing Android Dev...
- Price With Specification "LG 6210" CDMA Phone
- Price and Review New "LG 6160" CDMA Phone
- Gmail in mobile Safari: now even more like a nativ...
- Gmail in mobile Safari: now even more like a nativ...
- RIP Paul the Psychic Octopus
- Angry Birds Halloween HD for iPad
- Mobile Windows Phone 7 Info Specification "HTC Tr...
- Review About Andoid Smartphone "HTC Knight" The L...
- Images Can't Be Clicked After Adding Captions
- PBS for iPad - Watch Your Favorite PBS Shows
- iPad Screen Orientation Lock Switch to Mute Button
- Complete Info product Android phone "Motorola Droi...
- Info Price and Specification QWERTY Phone "Vitell ...
- Publish Post in Blogger Static Pages
- Review Apple MacBook Air 13" MC503LL/A Notebook
- Info Product Specification and Price "Vitell V711"...
- Info Price and Specification "Vitell V709 " Mobile...
- My iPad Keynote slideshow auto-advancing
- Exchange mail crashes & iPad Looping Reboot of Death
- Which is Better ? HP Slate 500 vs. MacBook Air
- Gigabyte GSmart G1305 Boston
- iMockups for iPad - Mobile Wireframing & Mockup app
- Voice Search in Russian, Polish, Czech and Turkish
- Voice Search in Russian, Polish, Czech and Turkish
- New Info About Android Phone "Lumigon" Handset f...
- download Application Blackberry Messenger 5.0.1.41
- New MacBook Air at $999 Only
- Samsung will use Bada OS in future televisions
- Android 2.2 On All Galaxy S Before
- How to Customize Links and Tabs on Pages Gadget
- Local notifications with iOS 4.2 for iPad
- We Doodle for iPad
- Info Complete Specification "LG Optimus 7Q" Produc...
- Info Android Phone "ZTE R750" Low Price
- TED for iPad - Education app
- Old camera connection accessorry compatibled with ...
- Steve Jobs takes shots at Android and BlackBerry
- Info Specification New Varian Multimedia Phone "No...
- Product Info "Samsung I8700 Omnia 7" Lates Windows...
- Different Background on Different Page
- Netflix on Wii Now
- New Xbox Kinect games line-up unveiled
- 2010 New AMD Radeon HD 6870 and HD 6850
- Hand-E-Holder holds your iPad in hand
- iPad screen goes black intermittently
- Info about Windows Phone 7 handset "Dell Veneu Pro...
- Complete InfoSpecification about WP7 handset "LG ...
- Adding an Already Added Gadget
- Info Specification and Price 3G Phone "Nexian Spee...
- Customize Tabs on Pages Gadget
- New Offer Phone Product "Nexian Hybrid NX-271D" T...
- Dedicated Separate Archive Page
- Virtual Static Page with Selected Posts in it
- An iPad Controls Self Driving Car
- Blogger Tips: Setting Up Homepage
- New Nokia Phones With Lavender Of Greatness
- Nokia N900 gets MeeGo boot option
- Nokia C5-03 Diumumkan Symbian^1 Layar Sentuh
- Complete Specification Info about "HTC 7 Surround ...
- Price With Feature Review TV Phone "SPC Boss 100"
- iPad locked up after trying to install iOS 4.2
- iA Writer for iPad
- Info Complete Specification "Nokia 5250" Music Phone
- Info Specification Product Windows Phone "Samsung ...
- Transformers Leader Class Starscream Review
- iOS4.2 Beta 3 for iPad Now Available
- Complete Info Specification about "HTC HD7" Window...
- Leak about New Android 2.2 (Froyo) Smartphone "HT...
- Complete Info Specification "HTC Mozart " The Wind...
- Info Complete Specification "HTC Desire Z" Androi...
- Cut the Rope Game HD Lite
- Apple Wireless Keyboard Layout can't match iPad
-
▼
October
(153)

