Date:Tuesday Jan 06, 2009

Roller Weblogger alternative Next Previous function


Another one of the standard roller weblogger functions I replaced: the next / previous function. Basically I just wanted this to be a little more informative, and host it as a menu list in the sidebar.

Here's a couple of examples:

and

And here's the code (don't forget to change the blog handle from 'eclectic'):


<ul class="rEntriesList">

#if ($model.results)

<li class="recentposts">» Currently viewing search results... </li>

#else

	#if($model.permalink)
		<li class="recentposts">» Reading <a href="$url.entry($model.weblogEntry.anchor)">$model.weblogEntry.title</a> </li>
                #if ($pager.prevLink)
                <li class="recentposts">» Backward: <a href="$pager.prevLink">$pager.prevName</a> </li>
                #end
                #if ($pager.prevCollectionLink)
                <li class="recentposts">» Backward: <a href="$pager.prevCollectionLink">$pager.prevCollectionName</a> </li>
                #end
                #if ($pager.nextLink)
                <li class="recentposts">» Forward: <a href="$pager.nextLink">$pager.nextName</a> </li>
                #end
                #if ($pager.nextCollectionLink)
                <li class="recentposts">» Forward: <a href="$pager.nextCollectionLink">$pager.nextCollectionName</a> </li>
                #end
                <li class="recentposts">» Return to <a href="http://blogs.sun.com/eclectic/">main site</a>. </li>
  	#elseif($model.weblogCategory)
		<li class="recentposts">» Reading entries related to the "<a href="$url.entry($model.weblogCategory.anchor)">$model.weblogCategory.name</a>" category </li>
                <li class="recentposts">» From <a href="$url.entry($entryFirst.anchor)">$entryFirst.title</a> </li>
                <li class="recentposts">» To: <a href="$url.entry($entryLast.anchor)">$entryLast.title</a> </li>
                #if ($pager.prevLink)
                <li class="recentposts">» Backward: <a href="$pager.prevLink">$pager.prevName</a> </li>
                #end
                #if ($pager.prevCollectionLink)
                <li class="recentposts">» Backward: <a href="$pager.prevCollectionLink">$pager.prevCollectionName</a> </li>
                #end
                #if ($pager.nextLink)
                <li class="recentposts">» Forward: <a href="$pager.nextLink">$pager.nextName</a> </li>
                #end
                #if ($pager.nextCollectionLink)
                <li class="recentposts">» Forward: <a href="$pager.nextCollectionLink">$pager.nextCollectionName</a> </li>
                #end
                <li class="recentposts">» Return to <a href="http://blogs.sun.com/eclectic/">main site</a>. </li>
	#else
		<li class="recentposts">» Reading the <a href="http://blogs.sun.com/eclectic/">main</a> site </li>

                <li class="recentposts">» From <a href="$url.entry($entryFirst.anchor)">$entryFirst.title</a> </li>
                <li class="recentposts">» To: <a href="$url.entry($entryLast.anchor)">$entryLast.title</a> </li>
                #if ($pager.prevLink)
                <li class="recentposts">» Backward: <a href="$pager.prevLink">$pager.prevName</a> </li>
                #end
                #if ($pager.prevCollectionLink)
                <li class="recentposts">» Backward: <a href="$pager.prevCollectionLink">$pager.prevCollectionName</a> </li>
                #end
                #if ($pager.nextLink)
                <li class="recentposts">» Forward: <a href="$pager.nextLink">$pager.nextName</a> </li>
                #end
                #if ($pager.nextCollectionLink)
                <li class="recentposts">» Forward: <a href="$pager.nextCollectionLink">$pager.nextCollectionName</a> </li>
                #end
	#end

#end

</ul>



Online

Flickr

www.flickr.com

Where

Search

This blog only

Related

Language

Archive

Subscribe

 

Do the right thing

Join the Blue Ribbon Online Free Speech Campaign
Join the Online Free Speech Campaign!

kthxbai

Visitors

Locations of visitors to this page
  • » Large Cluster Map
  • » Unique Visitors:
  • Today's Page Hits: 1276