Tuesday January 25, 2005
JunkfoodFood and Junk. Roller: Improved Permalink Format In most blogs I've seen, a Permalink for an entry is a URL that points to a page containing just that entry, along with that entry's comments. However, Roller uses Permalink URLs that contain a date and point to a page containing all entries from that date and earlier (containing the entry specified, along with a whole bunch of other entries). This is so, even though Roller already has the capability to generate pages that look like "standard" Permalink pages. If you look at the URL for any Roller blog entry's "Comments" page, you'll see
that it is very similar to a "standard" Permalink URL. And, if you follow the
Comments link, the resulting page looks very much like a "standard"
Permalink page. In fact, if we take a Roller comments page URL and simply
remove the " The below macro overrides the standard Roller macro for generating Permalink URLs, to use the alternate format. The diff is also below. Because I do not know whether overriding the Permalink URL format might have any side effects (within Roller or for outside agents/aggregators), I have not implemented it on my blog. (I have tested it, and it appears to work just fine.) This macro needs to be put in the "_day" template. Putting it in the "Weblog" template does not work.
#macro( showEntryPermalink $entry )
<a href="$ctxPath/page/$userName/$page.link/$utilities.encode($entry.anchor)"
title="$text.get( "macro.weblog.entrypermalink.title" )"
class="entrypermalink">Permalink</a>
#if ($pageHelper.isUserAuthorizedToEdit())
[<a href="$pageHelper.getEntryEditUrl($entry)">
$text.get( "macro.weblog.entrypermalink.edit" )</a>]
#end
#end
2c2
< <a href="$baseURL$entry.permaLink"
---
> <a href="$ctxPath/page/$userName/$page.link/$utilities.encode($entry.anchor)"
(2005-01-25 09:24:00.0) Permalink | Comments [3] Post a Comment: Comments are closed for this entry. |
Calendar
Recent Entries
SearchNavigation
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Posted by 195.176.20.45 on January 25, 2005 at 02:15 PM EST #
Posted by junkfood on January 25, 2005 at 04:35 PM EST #
Posted by Lance Lavandowska on January 27, 2005 at 05:08 PM EST #