Frostyland (blogs.sun.com/frosty) Title Graphic

Harvesting the Ephemeral

« In the Sun | Main | Special Day of Days »
20050526 Thursday May 26, 2005
Hacking the Blog ... in Hacking

I've been spending time researching Roller and slowly figuring out how to tweak the template. I'm constantly playing around with the style sheet, and seeing how much I can pull off there. So far it's been pretty simple - just tweaking values here and there. Initially the template used many styles that simply weren't defined, so it was a matter of adding them to the style sheet.

After reading gconf's blog, I was inspired to figure out how to add the category next to the entry title. Looking over Roller's macro documentation, I couldn't find the string I wanted. I was hoping there was a variation of showWeblogCategoryChooser, which is called in the beginning of the template:

<div id="Content">
<center>
<img src="http://blogs.sun.com/roller/resources/frosty/frostyland.title.v2.jpg"
width="435" height="120" border="0">
<p class="descrip">#showWebsiteDescription()</p>
#showWeblogCategoryChooser()<br>
</center>
#showWeblogEntries("_day" 15)
<hr />
#showReferers( 40 25 )
</div>

... but no such luck. Then I remembered reading that it is possible to subscribe to a blog's RSS feeds by category - so there had to be way then, right?. So off to the Roller Macro Reference to take a peek at the the rss velocimacro. And there it was in the template source:

<category>$entry.category.name</category>

So off to plug that in to my _day template file. And while I was at it, I made some other tweaks (spacing and alignment):

#foreach( $entry in $entries )
<a name="$entry.anchor" id="$entry.anchor"></a>
<b>$entry.title</b>
<span class="category"> ... <i>in</i> $entry.category.name</span>
$entry.text
<p align="right">
#showCommentsPageLink( $entry ) :
#showEntryPermalink( $entry ) :
<span class="dateStamp">($entry.pubTime)</span>
</p>
#end

I'm pleased with the results. It's not that hard, just takes a bit of persistence.

Next up is more style sheet tweaks and additions of classes, and to fix one of my biggest peaves, the <ul> tag. If you're a CSS hacker, you probably know about A List Apart. There's a great article about lists and how to customize the layout and appearance. You'd be surprised at what you can do with <ul>.

Comments:

H'mm. Interesting!

There are others that could do with reading this article. I'm going to bookmark it and boost it on my blog soon.

Keep up the good work.

Posted by Dave on June 07, 2005 at 02:25 PM PDT #

good tweak ideas. thanks for detailing them.

Posted by oz on June 08, 2005 at 12:21 PM PDT #

Post a Comment:

Comments are closed for this entry.

Today's Page Hits: 315

OpenSolaris Chinese Logo
Calendar
« December 2009
SunMonTueWedThuFriSat
  
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
  
       
Today

RSS Feeds
XML
All
/Artistry
/Distractions
/Food
/Hacking
/Inspiration
/Kewl
/Life
/Movies
/Music
/Parenting
/Poetry
/Ramblings
/Reading
/Work
Technorati
Links
+ Blogroll
Navigation

blogs.sun.com
Weblog
Login

Locations of visitors to this page