Blogger值得注意的模板-分页后的修复或替换? [英] Blogger Notable Template - Post Pagination Fix or Replacement?

查看:102
本文介绍了Blogger值得注意的模板-分页后的修复或替换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

主页底部的Blogger值得注意"模板的分页链接仅显示更多帖子"链接.它缺少以前的帖子".它还缺少传统的主页"链接. 更多帖子"链接正确地消失在帖子的最后一页.

The Blogger "Notable" template's post pagination link on the bottom of the main page only shows a "More Posts" link. It's missing a "Previous Posts". It's also missing the traditional "Home" link. The "More Posts" link correctly disappears on the last page of posts.

我希望至少启用一个以前的帖子"链接.

I am looking to enable at least a "Previous Posts" link.

这似乎是Google的故意行为,因为代码包含以下内容:

This appears to be intentional on the part of Google as the code includes this:

<div class='blog-pager container' id='blog-pager'> <b:include cond='data:newerPageUrl' name='previousPageLink'/> <b:include cond='data:olderPageUrl' name='nextPageLink'/> <b:include cond='data:view.url != data:blog.homepageUrl' name='homePageLink'/></div>

但是在两个位置,每个代码都包含:

But in two locations each the code includes:

<b:includable id='previousPageLink'><!-- Don't show --></b:includable>

<b:includable id='homePageLink'><!-- Don't show --></b:includable>

我试图通过首先更改以下行来解决此问题:

I attempted to fix this by first altering this line:

<a expr:href='data:blog.homepageUrl'>Home</a>

唯一要做的是将主页"链接显示在先前放置更多帖子"的帖子的最后一页上.在网上找到的其他几个示例无法使用,因为它们引用的是模板中不再存在的代码.

The only thing that did was the "Home" link to appear on the last page of posts where the "More Posts" previous was placed. Several other examples found online could not be tried as they refer to code that no longer exists within templates.

我还尝试了至少十二种第三方编号的分页编码方案,这些方案会覆盖Blogger的现有代码,但是这些代码无法正常工作.

I've also tried at least a dozen 3rd party numbered pagination coding schemes which overwrite Blogger's existing code, but those do not work correctly.

关于如何修复模板以启用可能起作用的链接或第三方代码的任何想法?

Any idea of how to fix the template to enable the links or 3rd party code that might work?

推荐答案

您将需要替换-

<b:includable id='previousPageLink'><!-- Don't show --></b:includable>

<b:includable id='previousPageLink'>
    <a class='blog-pager-newer-link flat-button ripple' expr:href='data:newerPageUrl' expr:title='data:messages.newerPosts'>
        <data:messages.newerPosts/>
    </a>
</b:includable>

并替换

<b:includable id='homePageLink'><!-- Don't show --></b:includable>

使用

<b:includable id='homePageLink'>
    <a class='home-link flat-button ripple' expr:href='data:blog.homepageUrl' expr:title='data:messages.home' >
        <data:messages.home/>
    </a>
</b:includable>

在页面导航中显示以前的帖子"(现在称为更新的帖子")和主页"按钮.根据所使用的主题,您将需要添加自定义CSS以使其正确显示

to show the Previous Posts (now called Newer Posts) and Home button in the page navigation. Depending on theme being used, you will need to add custom CSS to make them appear correctly

这篇关于Blogger值得注意的模板-分页后的修复或替换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆