Home > Tutorial > Virtual Static Page with Selected Posts in it
Virtual Static Page with Selected Posts in it
Posted on Saturday, October 16, 2010 by android apps market for tablests
I realized that this is another common effect that bloggers are trying to achieve but has no direct solution to it. So this tutorial is made especially for you guys. In this tutorial, you will learn how to link to posts sorted by a specific label, and place this link on your Pages Gadget or Menu Bar or Navigation Bar. If you still don't know what I am talking about, imagine a link on your menu bar which you can click on, and this link will bring you to a page similar to your main page, but with only selected posts in it.
Some bloggers are looking ways to achieve this using static pages. Unfortunately, you can't do it using a static page. Blog posts are dynamic, and static pages are static, the two certainly don't mix. However, we can simulate this effect. In this tutorial you will learn how to simulate an effect of having posts in a static page which already have texts or images. So it'd look like a normal static page, but with selected posts on it. And you don't need to waste a static page to do this! From here on, I will be addressing this page as Virtual Static Page.
So, in short, what you will get is a menu which has extra tabs on it, and when you click that tab, you will be brought to a page which has posts that you have specifically selected. In addition, you could also have texts or images there to act like a header of that page. You can check out my test blog here:
http://yoboytestblog.blogspot.com
The idea is is to show a HTML/Javascript gadget in all pages, add a CSS code to hide this gadget from all pages except for one defined page. This page is the label filtered page, which will have only selected posts on.
Some bloggers are looking ways to achieve this using static pages. Unfortunately, you can't do it using a static page. Blog posts are dynamic, and static pages are static, the two certainly don't mix. However, we can simulate this effect. In this tutorial you will learn how to simulate an effect of having posts in a static page which already have texts or images. So it'd look like a normal static page, but with selected posts on it. And you don't need to waste a static page to do this! From here on, I will be addressing this page as Virtual Static Page.
So, in short, what you will get is a menu which has extra tabs on it, and when you click that tab, you will be brought to a page which has posts that you have specifically selected. In addition, you could also have texts or images there to act like a header of that page. You can check out my test blog here:
http://yoboytestblog.blogspot.com
The idea is is to show a HTML/Javascript gadget in all pages, add a CSS code to hide this gadget from all pages except for one defined page. This page is the label filtered page, which will have only selected posts on.
Step 1:
Objective: Place texts/images that you want to be displayed on this 'virtual static page' that we are creating (optional).
For example, if your page is about 'My Bedroom', and you want all the posts related to Bedroom to be shown there, this is where you want to write an introductory statement about this page. You might want to say something like 'This page contains all the posts related to My Bedroom' and place a picture with it. Alternatively, if you want less work (much less), you can ignore this step. So your virtual page will consist of only your posts and you won't be able to add additional texts or images to it.
To place texts or images on your virtual page, go to Dashboard - New Post - Compose and start designing how you want the texts and the images to be. Once you are done, click on 'Edit HTML' and copy the entire code there.
Next, go to Dashboard - Design - Page Elements - Add a Gadget - HTML/Javascript - Paste your code there. After that, reposition this gadget to be above the Blog Posts box. Refer to the attached image below.
Objective: Place texts/images that you want to be displayed on this 'virtual static page' that we are creating (optional).
For example, if your page is about 'My Bedroom', and you want all the posts related to Bedroom to be shown there, this is where you want to write an introductory statement about this page. You might want to say something like 'This page contains all the posts related to My Bedroom' and place a picture with it. Alternatively, if you want less work (much less), you can ignore this step. So your virtual page will consist of only your posts and you won't be able to add additional texts or images to it.
To place texts or images on your virtual page, go to Dashboard - New Post - Compose and start designing how you want the texts and the images to be. Once you are done, click on 'Edit HTML' and copy the entire code there.
Next, go to Dashboard - Design - Page Elements - Add a Gadget - HTML/Javascript - Paste your code there. After that, reposition this gadget to be above the Blog Posts box. Refer to the attached image below.
Step 2:
Objective: Choose the posts that you want to be displayed on this 'Virtual Static Page'
To do this, go to Dashboard - Edit Posts - thick the posts that you want to be displayed - Click the 'Label Actions' dropdown - New label - Enter a new label.
If you have executed Step 1 (add Text/Images to your page), then you have to follow a few rules in naming you labels. You don't have to do this if you don't want to have text/images in your virtual static page..
Objective: Choose the posts that you want to be displayed on this 'Virtual Static Page'
To do this, go to Dashboard - Edit Posts - thick the posts that you want to be displayed - Click the 'Label Actions' dropdown - New label - Enter a new label.
If you have executed Step 1 (add Text/Images to your page), then you have to follow a few rules in naming you labels. You don't have to do this if you don't want to have text/images in your virtual static page..
- The labels must not contain spaces. So a single word will be preferable. If you must use two or more words, use dash (-) in between them, like 'my-bedroom'.
- You must end the label with .html . So your labels will look something like this:
Step 3:
Objective: Hide labels from each post. (optional)
This is optional. To do this, Dashboard - Design - Page Elements - Click edit on Blog Posts - Uncheck Labels - Save.
If you can't remove it for some unknown reason, you can code it out. Go to Design - Template Designer - Advanced - Add CSS - Paste the following code there.
Objective: Hide labels from each post. (optional)
This is optional. To do this, Dashboard - Design - Page Elements - Click edit on Blog Posts - Uncheck Labels - Save.
If you can't remove it for some unknown reason, you can code it out. Go to Design - Template Designer - Advanced - Add CSS - Paste the following code there.
.post-labels{
display: none;
} Step 4:
Objective: Create Menu Tab for the Virtual Page
Now comes the real thing. This is where you will do something to create a tab in the menu, which you can click on to bring you to the virtual page.
It's easy. Go to Dashboard - Design - Page Elements - Add a Gadget (below your header) - LinkList. If you already have Pages gadget there, replace your Pages gadget with a LinkList gadget. Now, manually add all the links to your static pages. In addition, add a link to your virtual static page as well. This is an example of how label link looks like:
You are almost done. If you did not place any text or images in your virtual page, there is nothing left for you to do. You can view your blog, and there will be extra tabs on which you can click on, and you'll be able to see the posts that you have picked (labelled) there. However, if you have chosen to place an image or text on this particular virtual page to make it look like a static page, there is one extra step to do.
Objective: Create Menu Tab for the Virtual Page
Now comes the real thing. This is where you will do something to create a tab in the menu, which you can click on to bring you to the virtual page.
It's easy. Go to Dashboard - Design - Page Elements - Add a Gadget (below your header) - LinkList. If you already have Pages gadget there, replace your Pages gadget with a LinkList gadget. Now, manually add all the links to your static pages. In addition, add a link to your virtual static page as well. This is an example of how label link looks like:
http://yoboytestblog.blogspot.com/search/label/homemade
_
You are almost done. If you did not place any text or images in your virtual page, there is nothing left for you to do. You can view your blog, and there will be extra tabs on which you can click on, and you'll be able to see the posts that you have picked (labelled) there. However, if you have chosen to place an image or text on this particular virtual page to make it look like a static page, there is one extra step to do.
Step 5:
Objective: Customize your Virtual Static Page by adding page-specific texts or images
In Step 1, you have placed an HTML/Javascript gadget on top of your Blog Post to act as an introductory design to your virtual page. The only problem is, this text/image is being shown in all the pages. So what we gonna do now is to specifically code the template to only show this design in the specifically defined virtual page.
To do this, first you want to know how to address the HTML/Javascript gadget. If this is your first HTML/Javascript gadget, by default it will be addressed with the id HTML1. You can learn how to check your gadget's ID here.. Mine is HTML1, as shown below:
Now that we have known our ID, we want to write a code specifically to make this gadget invisible on all the pages, except for one page that we define. This is the code that you want:
To use this code in your template, you'd have to change the URL to the virtual page's URL, and change the gadget ID if it is not same as mine. Next, we want to place this code in our template.
Go to Dashboard - Design - Edit HTML - and find for </b:skin> - and place the above code directly below it, and click save template.
You are done! If you have done everything correctly, when you visit your blog, you will see the same main page like always with your posts being there, and additionally you will have one (or more) tabs on your menu. You can click this tab, and it will bring you to a virtual static page which has it's own text or images and a bunch of selected posts.
Objective: Customize your Virtual Static Page by adding page-specific texts or images
In Step 1, you have placed an HTML/Javascript gadget on top of your Blog Post to act as an introductory design to your virtual page. The only problem is, this text/image is being shown in all the pages. So what we gonna do now is to specifically code the template to only show this design in the specifically defined virtual page.
To do this, first you want to know how to address the HTML/Javascript gadget. If this is your first HTML/Javascript gadget, by default it will be addressed with the id HTML1. You can learn how to check your gadget's ID here.. Mine is HTML1, as shown below:
Now that we have known our ID, we want to write a code specifically to make this gadget invisible on all the pages, except for one page that we define. This is the code that you want:
<b:if cond="data:blog.url != "http://yoboytestblog.blogspot.com/search/label/homemade.html"">
<style>
#HTML1{
display:none;
}
</style>
</b:if>
To use this code in your template, you'd have to change the URL to the virtual page's URL, and change the gadget ID if it is not same as mine. Next, we want to place this code in our template.
Go to Dashboard - Design - Edit HTML - and find for </b:skin> - and place the above code directly below it, and click save template.
You are done! If you have done everything correctly, when you visit your blog, you will see the same main page like always with your posts being there, and additionally you will have one (or more) tabs on your menu. You can click this tab, and it will bring you to a virtual static page which has it's own text or images and a bunch of selected posts.
Step 6 (Optional):
Objective: Margin Fix
After executing Step 5, you might notice that all the pages (except for your intended virtual page) has gone a little lower. Well, there's a quick fix to it. Use your firebug to inspect your blog's ID.
This page element can be addressed by the class column-center-inner (in my case). You can learn how to check your blog's ID here..And I want to bring this element a little bit upward in all my pages, except for the virtual page (since the virtual page is already level as it is). So this is the code that I will be using:
To add this code, go to Design - Edit HTML - Find for </b:skin> - and place the above code directly below </b:skin>
You're almost done again!
Objective: Margin Fix
After executing Step 5, you might notice that all the pages (except for your intended virtual page) has gone a little lower. Well, there's a quick fix to it. Use your firebug to inspect your blog's ID.
This page element can be addressed by the class column-center-inner (in my case). You can learn how to check your blog's ID here..And I want to bring this element a little bit upward in all my pages, except for the virtual page (since the virtual page is already level as it is). So this is the code that I will be using:
<b:if cond="data:blog.url != "http://yoboytestblog.blogspot.com/search/label/homemade.html"">
<style>
.column-center-inner{
margin-top: -25px
}
</style>
</b:if>
To add this code, go to Design - Edit HTML - Find for </b:skin> - and place the above code directly below </b:skin>
You're almost done again!
Step 7 (Optional):
Objective: To remove the tag "Showing newest posts with label imported.html. Show older posts"
In your blog, if you have a post which is newer compared to the latest post in your virtual page, you will be greeted with a tag that looks like this:
You can remove this by adding the following CSS code:
That is it. You are done. In this tutorial, I have only added one HTML gadget to introduce one Virtual Page, though I have two virtual pages in my menu. Similarly, you can add two HTML gadgets to address both of the virtual pages. Be sure to go through Step 5 and Step 6 to make the texts and images to be shown at their respective pages.
Happy trying.
Objective: To remove the tag "Showing newest posts with label imported.html. Show older posts"
In your blog, if you have a post which is newer compared to the latest post in your virtual page, you will be greeted with a tag that looks like this:
You can remove this by adding the following CSS code:
.status-msg-wrap{
display: none;
}
Go to Design - Template Designer - Advanced - Add CSS - Paste the above code there.
That is it. You are done. In this tutorial, I have only added one HTML gadget to introduce one Virtual Page, though I have two virtual pages in my menu. Similarly, you can add two HTML gadgets to address both of the virtual pages. Be sure to go through Step 5 and Step 6 to make the texts and images to be shown at their respective pages.
Happy trying.
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)




