【发布时间】:2014-06-25 00:24:58
【问题描述】:
您好,我正在尝试将静态 html 和 css 设计转换为博客模板。我遇到了一个问题,我希望包含的帖子可以返回帖子标题,而是返回博客标题。这是帖子的包含代码,下面是包含 html 结构的主要包含代码中调用的包含代码。请任何关于我如何解决此问题的想法将不胜感激。
<b:includable id='post' var='post'>
<!--Article Summary-->
<b:if cond='data:post.title'>
<h1 class="article-title">
<data:post.title/>
</h1>
<b:else/>
<h1 class="article-title">
<data:post.title/>
</h1>
</b:if>
<p class="posted-by">
by
<em class="author-name"><data:post.author/></em>
on
<span class="date"><data:post.dateHeader/></span>
</p>
<p class="article-content">
<data:post.body/>
</p>
<a href="" class="large-button orange-button-color button">READ MORE</a>
</b:includable>
<b:if cond="data:blog.url == data:blog.homepageUrl">
<div class="article-summary">
<img class="article-image" src="https://lh3.googleusercontent.com/article-main-image.jpg" alt="article-main-image"/>
<b:include name="post"/>
</div>
</b:if>
【问题讨论】: