Displays On Page Specific Widget


Hi bloggers, how are you all? hopefully in good health and is always cheerful. In this article, I will share the knowledge I've learned to you is still about bloggers and the topics I discuss this time is about "Showing widgets on specific pages" that are often used in the template megazine, for example you want to display the widget only posted post or no just posted post. Well we just learned together. first step you have to do is enter the menu " Design "and then go to the" Edit HTML "and check the"Expand widget templates " and find code like this widget







<b:widget id='HTML1' locked='false' title='Pesan' type='HTML'>
<b:includable id='main'>

<!-- only display title if it's non-empty -->
<b:if cond='data:title != &quot;&quot;'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

<b:include name='quickedit'/>

</b:includable>
</b:widget>

To facilitate the search widget Please enter a title such as " Message "box into the browser search (ctrl + F) then add code <b:if cond='data:blog.url == data:blog.homepageUrl'> and closed with a code </ b: if> to put on only the front page alone and placed as below










<b:widget id='HTML1' locked='false' title='Pesan' 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 != &quot;&quot;'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>

<b:include name='quickedit'/>
</b:if>
</b:includable>
</b:widget>

Note the placement of code that is green ! then save . , and below is the code that can be used for other placement to put on the front page / index to use code






<b:if cond='data:blog.pageType == data:blog.homepageUrl'>


To put it in the Archive page
<b:if cond='data:blog.pageType == "archive"'>


To place an item posted / posting only use code
<b:if cond='data:blog.pageType == "item"'>


And to the page or pages used static page blogger
<b:if cond='data:blog.pageType == "static_page"'>

And for extra, if you want to put on a specific page by using the URL using the code below
<b:if cond='data:blog.url == "URL_HERE"'>


Replace code URL_HERE the URL you want to display. , and for exceptions, for example, you do not put the widget only on the front page just by changing the sign = first to sign ! Example





<B: if cond = 'data: blog.pageType ! = data: blog.homepageUrl '>

Well not too hard right? may be useful for you. A few please comment if there is a question,: D NB: Code above also can be applied to other bloggers functions which I will discuss in a later

0 comments:

Post a Comment