-->

Blogger Data Structure Updates 2015

Recently Blogger has released several new operators for the Data Structure XML syntaxe. This new syntax allows bloggers to write code templates that better for handling Data Structure node is empty error, more logical and more efficient. In addition to reducing the size of the file XML and transform your exist blog template into SEO friendly template, a new syntax also allows developers to be able to find new potentials in manipulating the template code Bloggers who used mostly only we can do with JavaScript.

Search Query Update:

Old Code:
< b: if  cond = 'data: the blog.searchQuery' >
  < b: if  cond = 'data: the numPosts & gt; 10 ' >    Search results with the number of posts more than 10...  </ b: if >
</ b: if >
New Code:
< b: if  cond = 'data: the blog.searchQuery and Data: numPosts & gt; 10 ' >  Search results with the number of posts more than 10...</ b: if >< b: if  cond = 'data: the blog.searchQuery & amp; & amp; Data: numPosts & gt; 10 ' >  Search results with the number of posts more than 10...</ b: if >

Post and Static Page Update:

Old Code:
< b: if  cond = 'data: the blog.pageType == & quot; index & quot;' >  Code…..</ b: if >
< b: if  cond = 'data: the blog.pageType == & quot; item & quot;' >  Code…..</ b: if >
New Code:
< b: if  cond = 'data: the blog.pageType == & quot; index & quot; or the data: blog.pageType == & quot; item & quot; ' >Code. ...</ b: if >< b: if  cond = 'data: the blog.pageType == & quot; index & quot; || Data: blog.pageType == & quot; item & quot; ' >  Code….</ b: if >

Comment Update:

Old Code:
< b: if  cond = 'data: the comment.isDeleted' >
< b: else />  Comments are not erased here ...</ b: if >< b: if  cond = 'data: the comment.isDeleted == & quot; false & quot;' >  Comments are not erased here ...</ b: if >
New Code
< b: if  cond = '! Data: comment.isDeleted' >  Comments are not erased here ...</ b: if >< b: if  cond = 'not the data: comment.isDeleted' >  Comments are not erased here ...</ b: if >

Ternary Selector Update:

Old Code:
& Lt; html class = & # 39; < b: if  cond = 'data: the blog.pageType == & quot; item & quot;' >  page-item< b: else />  page-non-item</ b: if > & # 39; & gt; code ...& Lt; / html & gt;
New Code:
< html  expr: class = 'data.blog.pageType == & quot; item & quot; ? & Quot; page-item & quot; : & Quot; page-non-item & quot; ' >  code...</ html >< html  expr: class = '& quot; page- & quot; + (Data.blog.pageType == & quot; item & quot;? & Quot; & quot;: & quot; non- & quot;) + & quot; item & quot; ' >code ...</ html >

Author Update:

Almost the same as the operator or, just that all reference commentator must be the same, its value are distinguished:
Old Code:
< b: if  cond = 'data: the comment.author == & quot; Author1 & quot;' >  Admin comment...</ b: if >
< b: if  cond = 'data: the comment.author == & quot; Author2 & quot;' >  Admin comment ...</ b: if >
< b: if  cond = 'data: the comment.author == & quot; admin & quot;' >  Admin comment...</ b: if >
New Code:
< b: if  cond = 'data: the comment.author in {& quot; Author1 & quot;, & quot; Author2 & quot;, & quot; admin & quot;}' >  Admin comment...</ b: if >< b: if  cond = 'data: the comment.author in [& quot; Author1 & quot;, & quot; Author2 & quot;, & quot; admin & quot;]' >  Admin comment ...</ b: if >< b: if  cond = '{& quot; Author1& quot;, & quot; Author2 & quot;, & quot; admin & quot;} contains the data: comment.author' >  Admin comment ...</ b: if >< b: if  cond = '[& quot; Author1& quot;, & quot; Author2 & quot;, & quot; admin & quot;] contains the data: comment.author' >  Admin comment ...</ b: if >

Else If Statement Update:

Old Code:
< b: if  cond = 'data: the blog.pageType == & quot; item & quot;' >
  < data: post.body />
< b: else />
  < b: if  cond = 'data: the blog.pageType == & quot; static_page & quot; ' >
    < data: post.body />
  < b: else />
    < Data: post.snippet />
  </ b: if >
</ b: if >
New Code:
< b: if  cond = 'data: the blog.pageType == & quot; item & quot;' >
  < data: post.body />
< b: elseif  cond = 'data: the blog.pageType == & quot; static_page & quot;' >
  < Data : post.body />
< b: else />
  < Data: post.snippet />
</ b: if >

No comments