<b:includable id='main'>
<!-- Return this on Home Page Only -->
<b:if cond='data:blog.pageType == "index"'>
<b:loop var='i' values='data:posts'>
<!-- Get Post Tile -->
<h2><data:i.title/></h2>
<!-- If there is an image or Images in the post, get the first one -->
<b:if cond='data:i.firstImageUrl'>
<img expr:src ="data:i.firstImageUrl" expr:alt="data:post.title"/><br/>
</b:if>
<!-- Get Snippet of the Post -->
<data:i.snippet /><br/>
<!-- Display a readmore Button -->
<a expr:href='data:i.url'><button>Read More</button></a>
</b:loop>
</b:if>
<!-- Return this on item/Posts page only -->
<b:if cond='data:blog.pageType == "item"'>
<h3><data:post.title/></h3>
<data:post.body/>
</b:if>
</b:includable>
</b:widget>
项目页面上没有显示任何内容
答案 0 :(得分:0)
Loop
页面, item
缺少帖子。试试这段代码
<!-- Return this on item/Posts page only -->
<b:if cond='data:blog.pageType == "item"'>
<b:loop var='i' values='data:posts'>
<h3><data:i.title/></h3>
<data:i.body/>
</b:loop>
</b:if>