0

我正在尝试创建一个问题博主,但在打印静态页面的内容时遇到问题。如果页面是静态类型,我想在 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>

但帖子内容不打印,并给我一个错误字典。如何显示此内容?

非常感谢您

4

2 回答 2

0

而不是blog.body试试这个:

<! - Post Content ->
<p class = 'lead'>
<data: post.body />
</p>
于 2015-05-14T06:31:56.437 回答
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>
于 2016-01-09T21:38:21.860 回答