The Data Object "newerPageTitle" / "olderPageTitle" Names Are Misleading

At the bottom of this page, if you're viewing this article in main page mode, you'll see a link labeled "Older Posts". If you're viewing this as a single article, the link will be "Older Post". If I've posted a more recent article than this, you'll see an additional link "Newer Posts", or "Newer Post", respectively.

In many online forums and web sites, instead of "Older Post", you'd see "Stop Posting Clickable Links To Malware", the actual title of the immediately older post in this blog.

Let's look at the code that provides this set of links. Stretch the width of the browser window, and / or reduce text size, so you can see each line in its entirety, if it matters to you.

<b:includable id='nextprev'>
<div class='blog-pager' id='blog-pager'>
<b:if cond='data:newerPageUrl'>
<span id='blog-pager-newer-link'>
<a class='blog-pager-newer-link' expr:href='data:newerPageUrl' expr:id='data:widget.instanceId + "_blog-pager-newer-link"' expr:title='data:newerPageTitle'><data:newerPageTitle/></a>

<b:if cond='data:olderPageUrl'>
<span id='blog-pager-older-link'>
<a class='blog-pager-older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + "_blog-pager-older-link"' expr:title='data:olderPageTitle'><data:olderPageTitle/></a>

<b:if cond='data:blog.homepageUrl != data:blog.url'>
<a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a>
<b:if cond='data:newerPageUrl'>
<a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a>

<div class='clear'/>

See "olderPageUrl"? If you're viewing this as a single article, that value will be "". The corresponding data object "olderPageTitle" should be "Stop Posting Clickable Links To Malware". Instead, it's simply "Older Post".

That's wrong. If there needs to be a generic label "Older Posts" / "Older Post", provide that as "olderPageLabel". But make "olderPageTitle" provide "Stop Posting Clickable Links To Malware", corresponding with "olderPageUrl" being "".

>> Top


AndrĂ© Felipe said…
That's exactly one of the issues that make me sad. Why don't they let us use the titles of the previous/next posts? :(
Dapur Blogs said…
can it shows the title?
Chuck Croll said…

Looking at "", it does not appear so.

In "Layouts Data Tags", we see:

olderPageUrl: If there are older posts than the ones on the current page, this is a URL to those posts. Context-sensitive for page type. (Not all pages will have this link.)
olderPageTitle: Title of the link to the older page of posts.
newerPageUrl: The newer equivalent of olderPageUrl.
newerPageTitle: The newer equivalent of olderPageTitle.

It looks like they have "PageTitle", and "PageUrl" - and that's it. "PageTitle" appears to be what I would call "PageCaption" - and there is no real "PageTitle".

So, I think no. The posts title, listed in "Newer" / "Older", isn't a possibility.