[EMAIL PROTECTED] wrote:
> Now my actual questions:
> 1) Is this (i.e., treating stylesheets like all other pages, with an
> action and a template) the way to have dynamic stylesheets?
> 
>  for small site ok, for big sites a no go for me

How would you do it on a big site? How do you handle images in 
stylesheets, do you just always use absolute url's?

In the past (on websites that didn't use symfony) I've used a simple 
script that would pre-process my stylesheets (link to stylesheet would 
look like <link rel=stylesheet href="/css/serve_css.php?stylesheet=main" 
type="text/css">, serve_css.php would then include() main.css and do 
some variable substitution), maybe I should just upgrade that script a 
bit and put in just enough symfony include()'s and initialisation code 
to be able to use the image_tag() helpers without having the overhead of 
the whole routing / database etc.

Or maybe I should setup apache to use php to handle .css files - there 
would be some overhead (of starting the php processor) but not much 
compared to using a full symfony request, and it would only be upon each 
user's first visit to the site, so as a percentage of total processing 
time it would be a small overhead.

Anyway, thanks for your answer.

cheers,

roel


> 2) How do I stop symfony from adding .css to my stylesheet, or will I
> have to use mod_rewrite to re-route /css/style.css to /css/style?
> 
> U can use a route like /index.php/getmystylesheet.css
> just use index.php! so the webserver can handle the request
> 
> mfg tobi
> 
> On May 24, 10:32 am, Roel Vanhout <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I'd like to generate my stylesheets dynamically (so that I can use
>> variables for colors and use the link_to() helper for image tags in
>> @url's) but I didn't find anything specific about it in the manual. All
>> that is really needed is to run the stylesheet template through the
>> template processor once, but that doesn't seem to be possible. So my
>> fallback idea was to delete the /css directory from my web root, make a
>> module called 'css' and have actions in there for every stylesheet I
>> need (at the moment only one, 'style.css'). I think I would have to
>> include my stylesheet with a link to /css/style and not /css/style.css,
>> but I could not find a way to suppress the '.css' that is added
>> automagically by symfony.
>>
>> Now my actual questions:
>> 1) Is this (i.e., treating stylesheets like all other pages, with an
>> action and a template) the way to have dynamic stylesheets?
>> 2) How do I stop symfony from adding .css to my stylesheet, or will I
>> have to use mod_rewrite to re-route /css/style.css to /css/style?
>>
>> Thanks.
>>
>> cheers,
>>
>> roel
> 
> 
> > 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to