How to use all xml for if condition in Nlogger

list of some commonly used conditions in Blogger XML:

data:blog.pageType == "index" - Check if the current page is the home page.data:blog.pageType == "item" - Check if the current page is an individual post page.data:blog.pageType == "static_page" - Check if the current page is a static page.data:post.isFirstPost - Check if the current post is the first post on the page.data:post.isLastPost - Check if the current post is the last post on the page.data:post.labels - Check if the current post has a specific label.data:post.title - Check if the current post has a specific title.data:post.date.year == "2022" - Check if the current post was published in a specific year.data:blog.url == data:blog.homepageUrl - Check if the current page is the home page.data:post.sticky - Check if the current post is sticky (stays at the top of the blog).

Here's an example using one of these conditions:


<b:if cond='data:post.isFirstPost'> <!-- Code to show only on the first post of the page --> </b:if> 

You can also use else and elseif statements in combination with these conditions to display alternative content


Post a Comment

Previous Post Next Post