Jan 8, 2010

How To Add A Related Post Widget in BLOGGER

ဘေလာ့ေတြကုိ လုိက္ၾကည့္ရင္းနဲ႔ Related Post ဆုိတာေလးကုိေတြ႔ပါတယ္။ ကုိယ့္ဘေလာ့ေလးမွာလည္း လုပ္ခ်င္လာတာနဲ႔ ရွာၾကည့္လုိက္တာ ေအာက္က ကုတ္ေလးကုိေတြ႕တာပါပဲ။ ဒီကုတ္ေလးက လက္ရွိဖြင့္လုိက္တဲ့ post ရဲ႕ post label ကုိ ၾကည့္ျပီး သူနဲ႔ တူတဲ့ တျခား post ေတြကုိ ေအာက္မွာ ေဖာ္ျပေပးတာပါပဲ။ ကုတ္ကေတာ့ ကၽြန္ေတာ္ေရးထားတာ မဟုတ္ပါ။ :P ေအာက္မွာ မူရင္းပုိ႔စ္ ကုိေပးထားပါတယ္။ လုပ္နည္းကေတာ့ ..

၁။http://smartboy.googlecode.com/files/related-post.htm မွာကုတ္ေလးကုိ ေဒါင္းပါ။
၂။Layout ကေန Edit HTML ကုိ ၀င္ပါ။
၃။Download Full Template လုပ္ျပီး အေဟာင္းကုိ backup အရင္လုပ္ပါ။
၄။ျပီးရင္ Expand Widget Templates ကုိ အမွတ္ျခစ္ေပးပါ။
၅။ေအာက္က ကုတ္ကုိရွာပါ။

< div class='post-body entry-content'>
< data:post.body/ >
< div style='clear: both;'/> <!-- clear for photos floats -- >
< /div >

၆။လက္ရွိ ေဒါင္းထားတဲ့ ကုတ္ေတြကုိ < data:post.body/ > ရဲ႕ ေအာက္မွာ ကပ္ထည့္ေပးပါ။ ဒါဆုိရင္ျပီးပါျပီ။
အကယ္လုိ႔ အရင္ကတည္းက blog မွာ Read More function ကုိ ထည့္ျပီးသားဆုိရင္ေတာ့ ေအာက္ပါအတုိင္း ကုတ္ကုိ ထည့္ေပးပါ။
MORE INFO ==> http://www.blogspottutorial.com/2008/11/how-to-add-related-post-widget.html

< b:if cond='data:blog.pageType == "item"'>
< style > .fullpost{display:inline;} < /style >
< p > < data:post.body/ > < /p >

< b:else/ >
< style > .fullpost{display:none;} < /style >
< p > < data:post.body/ >
< a expr:href='data:post.url'> < strong > Read more...< /strong > < /a > < /p >
< /b:if >

No comments:

Post a Comment