Time in Kathmandu:
0

Showing Widget / Gadget On Specific Pages Blogspot

Showing Widget / Gadget On Specific Pages Blogspot

Menampilkan Widget/Gadget Pada Halaman Tertentu Blogspot
If you want a widget or gadget appear on certain pages of your blog, then it can be set to function code B: if. One example of a widget set only appear on certain pages, can be viewed on the homepage of this blog .... In the post there is a long article article which is actually a set of HTML gadget only appeared on the front page.

Actually function b: if it is a conditional function that you can use on blogspot. By using this function we can arrange widgets are displayed on a page, depending on the type of the page. Can you set the widget or gadget is to be shown at 5 different types of pages, namely:
  • Homepage or Home
  • Post page article
  • Static Page page
  • Archive Page
  • Particular article pages
To do this you simply follow the simple steps below:

Search Widget You Want ID of the Restricted Shown On Specific Pages

  • To do this you can go to the LAYOUT menu.
  • EDIT click on the gadget you want restricted
  • By the time you click on EDIT on the old widget will be visible from the widget ID AT THE END OF THE URL (see picture below)
tampilan edit HTML JAVASCRIPT gadget blog
  • From the example above we can see that the ID at the end of the URL is HTML7 ....ID course at the end of your URL could be different ....

Give Commands condition b: if At Gadget or Widget

  • Once you get the ID of the widget, now go to the TEMPLATE
  • Click the EDIT HTML and then CONTINUE
  • Please tick EXPAND WIDGET TEMPLATE
  • After that, press Ctrl + F on your browser
  • Later will come the search box, please type the ID that was obtained (see example image)
Tampilan EDIT HTML TEMPLATE untuk widget

Once you find the code as above, it is time to insert the code b: if in the code above.Code B: if you actually insert depending on the type of page that you are targeting to display the widget. So follow one of the guides below ....

CAUTION ...
Look carefully at the position code b: if in the widget code ....
code <b: if ... always just below <b:includable id='main'>
while the closing code </ b: if> always just above the </ b: includable>

Displaying Widget Only In Home Page Homepage

Code form b: if you can use is like the example below:


<b:if cond='data:blog.url == data:blog.homepageUrl'>
The Restricted code ....
</ B: if>

Example after the code is applied ....

<b:widget id='HTML7' locked='false' title='' type='HTML'> 
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<! - Only display title if it's non-empty -> 
<b:if cond='data:title != ""'> 
<h4 class='title'> <data:title/> </ h4> 
</ B: if> 
<div class='widget-content'> 
<data:content/> 
</ Div> 
<b:include name='quickedit'/>
</ B: if>
</ B: includable> 
</ B: widget>

WHEN SAVE CHANGES

Widget displays on all pages except the homepage

Just change the code <b:if cond='data:blog.url == data:blog.homepageUrl'>
be <b:if cond='data:blog.url != data:blog.homepageUrl'>

Note the == turn into! =

Example after the code is applied ....
<b:widget id='HTML7' locked='false' title='' type='HTML'> 
<b:includable id='main'>
<b:if cond='data:blog.url != data:blog.homepageUrl'>
<! - Only display title if it's non-empty -> 
<b:if cond='data:title != ""'> 
<h4 class='title'> <data:title/> </ h4> 
</ B: if> 
<div class='widget-content'> 
<data:content/> 
</ Div> 
<b:include name='quickedit'/>
</ B: if>
</ B: includable> 
</ B: widget>

WHEN SAVE CHANGES

Displaying Posts Widget in All Pages Articles

Code form b: if you can use to restrict widget appear only on the article page alone is like the example below:

<b:if cond='data:blog.pageType == "item"'>
The Restricted code ....
</ B: if>

Example after the code is applied ....
<b:widget id='HTML7' locked='false' title='' type='HTML'> 
<b:includable id='main'>
<b:if cond='data:blog.pageType == "item"'>
<! - Only display title if it's non-empty -> 
<b:if cond='data:title != ""'> 
<h4 class='title'> <data:title/> </ h4> 
</ B: if> 
<div class='widget-content'> 
<data:content/> 
</ Div> 
<b:include name='quickedit'/>
</ B: if>
</ B: includable> 
</ B: widget>

WHEN SAVE CHANGES

Widget displays on All Pages pages EXCEPT Post Article

Just change the code <b:if cond='data:blog.pageType == "item"'> 
be <b:if cond='data:blog.pageType != "item"'>

Note the == turn into! =

Example after the code is applied ....
<b:widget id='HTML7' locked='false' title='' type='HTML'> 
<b:includable id='main'>
<b:if cond='data:blog.pageType != "item"'>
<! - Only display title if it's non-empty -> 
<b:if cond='data:title != ""'> 
<h4 class='title'> <data:title/> </ h4> 
</ B: if> 
<div class='widget-content'> 
<data:content/> 
</ Div> 
<b:include name='quickedit'/>
</ B: if>
</ B: includable> 
</ B: widget>

WHEN SAVE CHANGES

Widget displays at All Static Page

Code form b: if you can use to restrict widget appear only on the article page alone is like the example below:

<b:if cond='data:blog.pageType == "static_page"'>
The Restricted code ....
</ B: if>

Example after the code is applied ....
<b:widget id='HTML7' locked='false' title='' type='HTML'> 
<b:includable id='main'>
<b:if cond='data:blog.pageType == "static_page"'>
<! - Only display title if it's non-empty -> 
<b:if cond='data:title != ""'> 
<h4 class='title'> <data:title/> </ h4> 
</ B: if> 
<div class='widget-content'> 
<data:content/> 
</ Div> 
<b:include name='quickedit'/>
</ B: if>
</ B: includable> 
</ B: widget>

WHEN SAVE CHANGES

Widget displays on All Pages EXCEPT on Static Page

Just change the code <b:if cond='data:blog.pageType == "static_page"'> 
be <b:if cond='data:blog.pageType != "static_page"'>

Note the == turn into! =

Example after the code is applied ....
<b:widget id='HTML7' locked='false' title='' type='HTML'> 
<b:includable id='main'>
<b:if cond='data:blog.pageType != "static_page"'>
<! - Only display title if it's non-empty -> 
<b:if cond='data:title != ""'> 
<h4 class='title'> <data:title/> </ h4> 
</ B: if> 
<div class='widget-content'> 
<data:content/> 
</ Div> 
<b:include name='quickedit'/>
</ B: if>
</ B: includable> 
</ B: widget>

WHEN SAVE CHANGES

Widget displays on All Pages Archives

Code form b: if you can use to restrict widget appear only on the article page alone is like the example below:

<b:if cond='data:blog.pageType == "archive"'>
The Restricted code ....
</ B: if>

Example after the code is applied ....
<b:widget id='HTML7' locked='false' title='' type='HTML'> 
<b:includable id='main'>
<b:if cond='data:blog.pageType == "archive"'>
<! - Only display title if it's non-empty -> 
<b:if cond='data:title != ""'> 
<h4 class='title'> <data:title/> </ h4> 
</ B: if> 
<div class='widget-content'> 
<data:content/> 
</ Div> 
<b:include name='quickedit'/>
</ B: if>
</ B: includable> 
</ B: widget>

WHEN SAVE CHANGES

Widget displays on all pages except the Home Archives

Just change the code <b:if cond='data:blog.pageType == "archive"'> 
be <b:if cond='data:blog.pageType != "archive"'>

Note the == turn into! =

Example after the code is applied ....
<b:widget id='HTML7' locked='false' title='' type='HTML'> 
<b:includable id='main'>
<b:if cond='data:blog.pageType != "archive"'>
<! - Only display title if it's non-empty -> 
<b:if cond='data:title != ""'> 
<h4 class='title'> <data:title/> </ h4> 
</ B: if> 
<div class='widget-content'> 
<data:content/> 
</ Div> 
<b:include name='quickedit'/>
</ B: if>
</ B: includable> 
</ B: widget>

WHEN SAVE CHANGES

Showing Widget Only In One Specific Page

Code form b: if you can use to restrict widget appear only on the article page alone is like the example below:

<b:if cond='data:blog.url == "URL page here "'>
The Restricted code ....
</ B: if>

Example after the code is applied ....
<b:widget id='HTML7' locked='false' title='' type='HTML'> 
<b:includable id='main'>
<b:if cond='data:blog.url == "URL page here "'>
<! - Only display title if it's non-empty -> 
<b:if cond='data:title != ""'> 
<h4 class='title'> <data:title/> </ h4> 
</ B: if> 
<div class='widget-content'> 
<data:content/> 
</ Div> 
<b:include name='quickedit'/>
</ B: if>
</ B: includable> 
</ B: widget>

WHEN SAVE CHANGES

Widget displays on All Pages EXCEPT a particular URL

Just change the code <b:if cond='data:blog.url == "URL page here "'> 
be <b:if cond='data:blog.url != "page URL here "'>

Note the == turn into! =

Example after the code is applied ....
<b:widget id='HTML7' locked='false' title='' type='HTML'> 
<b:includable id='main'>
<b:if cond='data:blog.url != "page URL here "'>
<! - Only display title if it's non-empty -> 
<b:if cond='data:title != ""'> 
<h4 class='title'> <data:title/> </ h4> 
</ B: if> 
<div class='widget-content'> 
<data:content/> 
</ Div> 
<b:include name='quickedit'/>
</ B: if>
</ B: includable> 
</ B: widget>


WHEN SAVE CHANGES
===========================

This method can actually be applied not only on the widget alone, but also on CSS, and HTML and script out additional widgets. But it'll be under discussion in another article.Hopefully I display a widget on certain pages can help you. If there is a problem please conveyed through the comments below. Thanks for stopping by all bloggers ....

0 comments:

✓ I will try to respond to new comments soon.
✓ Do not ask permission to copy and paste .... if deemed useful article and would like to share please written in his own narrative.
✓ if the link does not work please Comment Below.
Note: Anyone can post a comment.

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More