[Radiant] Best way to refer to a stylesheet?

Mohit Sindhwani tech at onghu.com
Sun Jun 8 13:35:16 CDT 2008


John and Catherine Allen wrote:
> This has to be a really basic question, but despite reading the 
> documentation and many mailing list posts, I still don't get it...
>
> For stylesheets which are stored in the database
> 1) In a layout, what is the recommended way to refer to a stylesheet ?
> 2) In a page, what is the recommended way to refer to a stylesheet ?
>
> My stylesheets work fine when I refer to them as files in the 
> filesystem, but not when they are in the database.
>
> John
>
Hi John

If you have your stylesheet set up as a page in Radiant, you need to 
know its slug.  Once you know the slug, you can render it with something 
like this in your layout:

|    <link rel="stylesheet" type="text/css" href="/styles.css" />

This requires you to have a stylesheet under the root of your site in Radiant with a slig of styles.css.
|


This tutorial of mine very briefly touches on it:
http://notepad.onghu.com/2007/5/26/hello-world-using-radiant-cms

Cheers,
Mohit.
6/9/2008 | 2:35 AM.






More information about the Radiant mailing list