【问题标题】:<data:post.title> returns title of blog and not post title<data:post.title> 返回博客标题而不是帖子标题
【发布时间】: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>

【问题讨论】:

    标签: post blogger blogspot


    【解决方案1】:

    是正确的,所以我会好奇你是否从正确的地方加入。例如,您是在模板的 MOBILE 部分还是在 NON-MOBILE 部分?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-04-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多