Gray's Matter
Justice Gray - North America's favorite metrosexual software consultant
E-mail Justice
Subscribe to this feed
Subscribe to comments
Perennially Popular Posts
How to write a presentation abstract
My grandmother, globalization, and what's wrong with DateTime.Parse
A letter to my Worldvision sponsor child
Development Methodologies for the 21st Century
My grandmother & the difference between strong typing and weak typing
How I am becoming a better developer, part 1 of infinity
Facebook RSS Feeds: How to Write Your Own With C#
The Ten Keys To Happiness
My grandmother and the Global Assembly Cache (And Star Wars)
My grandmother and the difference between processes and threads
How to make a meeting request
Why you should never be an independent consultant
The DasBlog 1.9 AJAX Autosave True Story, Part 2
Other "metro" developers
Ben Scheirman
Bil Simser
D'Arcy Lussier
David Woods
Donald Belcham
Donald Jessop
George Clingerman
James Kovacs
Jason Hunt
Jason Row
Jean-Paul Boodhoo
Jeffrey Palermo
Joey deVilla
John Bristowe
Jonas Avellana
Kyle Baley
Mack Male
Martin Hinselwood
Michael McClenaghan
Mike Duncan
Mike Friesen
Mo Khan
Otyce
RoboSapient
Russell Ball
Scott Hanselman
Scott Reynolds
Steven Rockarts
Tech Embassy
Terry Thibodeau
Tom Opgenorth
Vladimir Levin
The Justice Gray Fan Club
Amazing Mrs. Loquacious
Dr. Teeth
Facedown
Janey Lynne
Maxime Lamy
Ridley Thunder
Stan Woo
Vanilla Con
Wobbly*Bits
I Wish These People Updated More Than Once a Year
Anand Narayan
Jeff Perrin
<< Perry Bible Fellowship - the greatest comic strip of modern times?
Cooking with Justice - a protein fruit smoothie recipe >>
DasBlog Hacks continued - PreviousEntry, NextEntry, RecentEntries
For those of you who use
DasBlog
, this might be interesting. For the rest of you this will be boring, which is why I've spiced it up with random imagery:
This picture has nothing to do with DasBlog, but I need something here for the non-technical readership
While most of you reading this through RSS will be unable to tell, I'm made some slight additions to this blog to enable navigation to past entries and future entries (for an example, either click on one of the popular posts to the left or the title of this entry). How else to ensure that my classic
Charles Atlas post
is not eternally lost to the ages? As well, the "recent entries" that are listed on the right side of this page are tweaked in comparison to the standard <%frontpagetitlelist%> macro that comes with DasBlog. These macros may or may not show up in the upcoming 1.9 release of DasBlog, but in the event you're in a rush and want to use them now, you can download
this DLL
to use the following macros:
Denzel Washington - The Black Justice Gray
Previous Entry and Next Entry
Sample syntax: <%previouslink("<< ")|codivation%>, <%nextlink(" >>")|codivation%>
These display a link to the previous entry and the next entry. They *only* display if the user has loaded a page with a single entry on it, i.e. a permalink. After all, it's pretty useless to have previous and next links if you're on the main page of the site, or looking through a full category worth of entries. Obviously, if you are on the most recent post the Next Entry Link will not display, and if you are on the very first post you ever made the Previous Entry Link will not display.
The string argument indicates what you'd like added to the link text (left side for the previouslink, right side for the nextlink). e.g. Using the sample syntax with a post creatively called "My Post" will produce "<< My Post" or "My Post >>" depending on if it is next in line.
Note the packaged Megatron in the top left corner
PreviousNextSeparator
Sample syntax: <%previousNextSeparator(" | ")|codivation%>
Depending on your formatting desires, there is also a PreviousNextSeparator macro that will display a separator string of your choice if:
a) the user is on a page with only one blog post (e.g. a permalink)
b) that page is not displaying either the most recent blog entry or the earliest (because, obviously, you're not going to have both a previous and a next at the end of the spectrum).
e.g. <%previousNextSeparator(" | ")|codivation%> = " | " when in the situations described above. I don't use this myself but it might be helpful depending on how you choose to style your blog.
Even Jesus likes these macros!
RecentEntries
Sample syntax: <%recententries()|codivation%>
This is basically identical to the FrontPageTitleList macro with 2 notable changes:
a) the table cell alignment no longer defaults to "center", so that you can use CSS to align it
b) the links it produces are now permalinks to individual entries (which happens to work well with the previous and next links) rather than anchor tags on the main front page.
2 more steps and you are all set.
1) Uncomment the following line in your web.config:
<section name="newtelligence.DasBlog.Macros" type="newtelligence.DasBlog.Web.Core.MacroSectionHandler, newtelligence.DasBlog.Web.Core" />
2) Add the following line to your web.config:
<add macro="codivation" type="Codivation.DasBlogExtras.DasBlogMacros, Codivation.DasBlogExtras" />
Now you are ready to bring your blog to a new unprecedented level of popularity!!
Saturday, August 12, 2006
Comments [1]
DasBlog
|
Technical
|
Tracked by:
"Rolling your own autosave with AJAX and Httphandlers - the True Dasblog 1.9 sto...
[Trackback]
8/13/2006 11:43:27 AM (Mountain Daylight Time, UTC-06:00)
Awesome. I am going to be using this. Kudos for getting this to work with dasBlog.
JRF
Name
E-mail
Home page
Remember Me
Comment (HTML not allowed)
Enter the code shown (prevents robots):
Justice Gray
: a seething cauldron of rampaging masculinity. A fighter! A brother! Your
secret lover
! He's also a software development consultant and the Vice President of the
Edmonton .NET user group
. He also greatly enjoys speaking about himself in the 3rd person.
Gray's Matter Archives
Recent Posts
Controversy clarifications!
The most controversial interview of ALL TIME
Finally! The *winner* of the "What Justice Gray Means to Me" contest
The mystery of D'Arcy Lussier's ASP.NET MVP is solved...
Well, now that's pretty horrifying
MVPs on MVC: "No, we don't have any idea either"
Why I am happy to not be at the MVP Summit
Donald Belcham's cry for help: MS MVPs, your attention is needed
ALT.NET Pursefighting revealed
Test, please ignore!
Change yourself, change the world: a great week 4
Post Categories
BookReviews
Conferences
DasBlog
EDMUG
Goals
HanselmanQuestions
HotDeveloperCorner
ILiveToInform
Leadership
Mac
OtherGrayAreas
Personal
Productivity
Ruby
Suresh
Technical
Transformers
Vancouver
Wii
<
July 2008
>
Sun
Mon
Tue
Wed
Thu
Fri
Sat
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
Sign In