Thursday May, 12 2005
This tip builds upon my last post about ditching the default decorator and shows you how to use your Roller templates to create a custom css file for your blog. If you haven't replaced your decorator template as I mentioned, then this probably will not work for you.
Now that we are no longer using a decorator template we are free to create new templates of any type we like (css, html, etc). To create your css file all you need to do is login to Roller and navigate to Website > Page Templates. From there you want to create a new template named "site.css".
Once your new template is created then you may edit it as normal and treat it just like you would treat any other css file. When you are done editing just make sure to save. You may check out my css file as an example if you like.
You can verify that your template was properly created by pointing your browser directly at the file. The url should be http://blogs.sun.com/roller/page/"username"/site.css
Finally, you'll probably want to make use of your new css template by adding it to your blog. You can do that by editing your "Weblog" template and adding this line after the <head> tag.
<link rel="stylesheet" href="$ctxPath/page/$userName/site.css" type="text/css" />
Voila! You are now using Roller templates to serve up your custom css file. This example also serves as a base for creating all different kinds of templates (txt, html, xml, etc). Enjoy.

Nice writeup. I wish you had done that a month eatlier. I had to comeup with a way in which I could use a custom template for my blog <em>(as I didnt like any of the prebuilt ones)</em>. However I have successfully <strong>SKINNED</strong> my Blog. You could preview it at blogs.sun.com/rohanpinto. I'd appreciate some comments and help on cleaning it up further.
Since rollerweblogger does not currently support vhost, I wrote a URL Scraper to pull content off of my blog at sun.com and render it on my own webserver. So until rollerWeblogger supports vhost service, I guess I'll just continue to do so.
And... I'd appreciate your comments on my blogs template... ;-)
Posted by Rohan Pinto on May 12, 2005 at 01:18 PM PDT #
cool site. i can see you've spent some time designing it which is always a good thing. i especially dig the banner image you have ... very cool.
here's a few quick ideas about what i would probably do with your current design ...</br>
- push the content on the right down a bit to line up with the bar on the right.
- ditch the copyright line at the top and center the search box better in that area.
- you need a margin on the right hand side of the page ... probably 15px or so.
- then i would probably change the way you display the date and push it down a little as well as make it smaller.
That's some ideas at least. At some point in the future I was thinking of doing a couple posts about designing a blog to try and help people do their own designs. I'm not a graphic designer in any right, but I figured it can't hurt.
And about the vhost thing ... I'm not sure that type of thing would ever really be a feature of Roller since it happens more at the webserver level. We'll see though.
Posted by gconf on May 12, 2005 at 02:04 PM PDT #