Dashboard > blojsom > ... > Users Guide > Friendly Permalinks
  blojsom Log In   View a printable version of the current page.  
  Friendly Permalinks
Added by David Czarnecki, last edited by David Czarnecki on Jan 08, 2005  (view change)
Labels: 
(None)

Overview

As of blojsom 2.17, a filter is included with blojsom allowing you to create more search engine "friendly" permalinks. This filter is enabled by default. It supports the following permalink structures.

Permalink structure Format Description Example
/year/month/day/permalink /YYYY/MM/DD/permalink Permanent link to an entry on a given year, month, and day. /2004/7/27/some-title.html
/year/month/day/ /YYYY/MM/DD/ All posts for the given year, month, and day. /2004/7/27/
/year/month/ /YYYY/MM/ All posts for the given year and month. /2004/7/
/year/ /YYYY/ All posts for the given year. /2004/

How can I create more friendly permalinks in my template?

The #friendlyPermalink Velocity macro can be used in your Velocity templates to create a more friendly permalink.

In your template, you might use this macro as follows:

... template code ...

#foreach ($entry in $BLOJSOM_ENTRIES)

... stuff ...
    
    #friendlyPermalink($entry)
    $entry.getTitle()
    <p/>
    $entry.getDescription()
    <p/>   

    posted by $!entry.getMetaData().get("blog-entry-author") at 
    <a href="$entryLink" title="permanent link">$entry.getDateAsFormat("h:mm a")</a>

... more stuff

#end

Site running on a free Atlassian Confluence Open Source Project License granted to blojsom. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators