-->

Functions and Uses of Conditional Tags



On this occasion I would like to share about Tag Conditional Function and Usage. Before we go any further you must first know what a Conditional tag is.

Tag Conditional is a command or tag used to set or condition a certain page elements css, widgets to display or not display widgets or other elements in your blogspot page or it can be said as displaying widgets on a particular page. Usually conditional tags are often found on the HTML editor page template blogger.

Baca Juga


So now you already understand not the meaning of the conditional tag. Ok now you can refer to the next set of Conditional tags below.

Functions and Functions of the Conditional Blogspot Tag Collection

1. Displays widgets only on Homepage

<b:if cond="data:blog.url == data:blog.homepageUrl">
.......ISI......
</b:if>

2. Displays widgets other than on Homepage

<b:if cond="data:blog.url != data:blog.homepageUrl">
.......ISI......
</b:if>

3. Displays widgets only in Archivepage

<b:if cond='data:blog.pageType == &quot;archive&quot;'>
.......ISI......
</b:if>

4. Displays Widgets other than in Archive Pages

<b:if cond='data:blog.pageType != &quot;archive&quot;'>
.......ISI.....
</b:if>

5. Displays Widgets in addition to Archivepages

<b:if cond='data:blog.pageType == &quot;item&quot;'>
.......ISI CSS......
</b:if>

6. Displays widgets other than in Item Pages

<b:if cond='data:blog.pageType != &quot;item&quot;'>
.......ISI......
</b:if>

7. Displays widgets only in Static Pages

<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
.......ISI......
</b:if>

8. Displays widgets other than Staticpages

<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
.......ISI CSS......
</b:if>

9. Displays widgets on specific URLs or pages

<b:if cond='data:blog.url == &quot;alamatpostingan&quot;'>
.......ISI CSS......
</b:if>

10. Displays widgets other than in specific URLs or pages

<b:if cond='data:blog.url != &quot;alamatpostingan&quot;'>
.......ISI CSS......
</b:if>

11. Displays the widget only the home page, not visible on the posting page

<b:if cond='data:blog.pageType != &quot;item&quot;'>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
.......ISI CSS......
.......ISI JAVASCRIPT......
</b:if>
</b:if>

12. Page ERROR

<b:if cond='data:blog.pageType == &quot;error_page&quot;'>
<a expr:href='HALAMAN/LINK_POSTINGAN_ERROR'/></b:if>

13. Displays widgets on mobile / mobile pages

<b:if cond='data:blog.isMobile'>
... Isi ...
</b:if>

14. Displays widgets in All / Common labels' pages

<b:if cond='data:blog.searchLabel'>
-----Isi-----------
</b:if>

15. Display widgets on Specific / Specific label page

<b:if cond='data:blog.searchLabel == &quot;NAMA LABEL&quot;'>
-----Isi-----------
</b:if>

16. Displays widgets on the Keyword browser page

<b:if cond='data:blog.searchQuery == &quot;KEYWORD&quot;'>
-----ISI-----------
</b:if>

17. Displays widgets on the First Post page

<b:if cond='data:post.isFirstPost'>
-----ISI-----------
</b:if>

Examples of how to use :


 <b:widget id='HTML5' 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 != &quot;&quot;'>
    <h2 class='title'><data:title/></h2>
  </b:if>
  <div class='widget-content'>
    <data:content/>
  </div>
</b:if>
  <b:include name='quickedit'/>
</b:includable>
    </b:widget>

The code I mark is a Conditional tag. So please you pack it with a conditional tag of a widget or code script that approximately you want to bring or reverse it in accordance with the usefulness of each tag.

Good luck.

TAG : Functions and Uses of Conditional Tags, Understanding Conditional Tags, Conditional tag.

1 Response to "Functions and Uses of Conditional Tags"

  1. this is old, blogger have introduced new conditions for identifying page types.

    BalasPadam

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel