Monday, February 11, 2008

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>
</span>
</b:if>

<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>
</span>
</b:if>

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

</div>
<div class='clear'/>
</b:includable>


See "olderPageUrl"? If you're viewing this as a single article, that value will be "http://bloggerstatusforreal.blogspot.com/2008/02/stop-posting-clickable-links-to-malware.html". 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 "http://bloggerstatusforreal.blogspot.com/2008/02/stop-posting-clickable-links-to-malware.html".

>> Top

1 comment:

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? :(