【问题标题】:Blogger Notable Template - Next Article and Previous Article Buttons missingBlogger 值得注意的模板 - 缺少下一篇和上一篇按钮
【发布时间】:2018-05-21 00:19:44
【问题描述】:

在较新的 Google 博客模板之一中,Notable, 当您查看博客文章时,Next ArticlePrevious Article 按钮不存在。

This post 解释了如何在博客主页上添加分页按钮以查看下一篇文章列表和上一篇文章列表,但没有涉及在博客文章中添加类似按钮以查看下一篇和上一篇文章。

Example of Main Blog Page with Pagination

Example of Blog Article needing Pagination (Highlighted in Pink)

知道如何添加此功能吗?我只是想为个别博客文章添加“上一篇文章”和“下一篇文章”按钮。

编辑更新了图片,希望更加清晰。

【问题讨论】:

    标签: pagination blogger


    【解决方案1】:

    我相信我已经找到了答案。只需要添加

            <b:if cond='data:blog.pageType == "item"'>
              <b:include cond='data:newerPageUrl' name='previousPageLink'/>
              <b:include cond='data:olderPageUrl' name='nextPageLink'/>
            </b:if>
    

    在这段代码中

          <div class='post-bottom'>
            <div class='post-footer'>
              <!-- Footer bylines -->
              <b:include name='footerBylines'/>
            </div>
              <b:include cond='data:view.isSingleItem and data:widget.type == &quot;Blog&quot;' data='{ shareButtonClass: &quot;post-share-buttons-bottom&quot;, overridden: true }' name='maybeAddShareButtons'/>
              <b:include cond='data:view.isMultipleItems or data:widget.type == &quot;PopularPosts&quot;' data='post' name='postJumpLink'/>
          </div>
    

    像这样

          <div class='post-bottom'>
            <div class='post-footer'>
              <!-- Footer bylines -->
              <b:include name='footerBylines'/>
            </div>
              <b:include cond='data:view.isSingleItem and data:widget.type == &quot;Blog&quot;' data='{ shareButtonClass: &quot;post-share-buttons-bottom&quot;, overridden: true }' name='maybeAddShareButtons'/>
              <b:include cond='data:view.isMultipleItems or data:widget.type == &quot;PopularPosts&quot;' data='post' name='postJumpLink'/>
              <b:if cond='data:blog.pageType == "item"'>
                <b:include cond='data:newerPageUrl' name='previousPageLink'/>
                <b:include cond='data:olderPageUrl' name='nextPageLink'/>
              </b:if>
          </div>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-22
      相关资源
      最近更新 更多