我正在尝试创建一个问题博客,并且在打印静态页面的内容时遇到问题。我想在div中显示内容,如果是静态类型的页面,我试试了
<b: if cond = 'data: blog.pageType == & quot; static_page & quot;'>
<div class = 'row page' itemscope = 'itemscope'>
<! - Blog Post Content Column ->
<div class = 'col-LG-8 col-lg-offset-2'>
<! - Title ->
<h1> <data: blog.pageName /> </ h1>
<! - Preview Image ->
<img alt = '' class = 'img-responsive' src = 'http: //placehold.it/900x300'/>
<hr />
<! - Post Content ->
<p class = 'lead'> <data: blog.body /> </ p>
但是帖子内容不会打印并给我一个错误字典。我该如何展示这些内容?
非常感谢
答案 0 :(得分:0)
而不是blog.body
试试这个:
<! - Post Content ->
<p class = 'lead'>
<data: post.body />
</p>
答案 1 :(得分:0)
<div id="staticpage-content">
<b:section id="staticPage" showaddelement='no'>
<b:widget id='Blog2' locked='true' title='Postagens no blog' type='Blog'>
<b:includable id='post' var='post'>
<h1><data:post.title/></h1>
<data:post.body />
</b:includable>
</b:widget>
</b:section>