Skip to Content.
Sympa Menu

en - [sympa-users] Re: Using css_url

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Olivier Salaün - CRU <address@concealed>
  • To: Steven Peterson <address@concealed>
  • Cc: address@concealed
  • Subject: [sympa-users] Re: Using css_url
  • Date: Wed, 15 Nov 2006 18:11:52 +0100

Sympa's default behavior is to use a dynamic CSS, ie one that is computed by wwsympa.fcgi for each request. The drawback of this situation is that it costs lots of CPU to compute the CSS (based on css.tt2) whereas the style sheet remains the same.

Steven,

The other option is to define a place to store a static CSS and tell Sympa where it is. (note that in Sympa 5.3a this is the default behavior. The static CSS is stored in a common "static_content/" directory. The CSS is automatically updated when upgrading Sympa). Here is what you should do :
  1. edit each robot.conf and set the css_path to the directory where CSS will be stored (with appropriate permissions for Sympa to read and write in this directory)
  2. define an Apache Alias for each virtual host : Alias /home/sympa/css-vhost1 /css
  3. edit each robot.conf and set the css_url to the URL of the CSS (corresponding to the previously defined Alias)
  4. restart Apache
  5. for each virtual host, make wwsympa create/update the static CSS : Sympa admin > skins admin page > install static css


Steven Peterson wrote:
I would like to define a separate style sheet for each virtual robot.  My original understanding was that by setting the url of the stylesheet in the css_url parameter:
  e.g. css_url	http://www.mydomain.com/css/

Sympa would then serve this url in the head of each wwwsympa request.  I used http://www.mydomain.com/sympa/css/style.css to get the default style sheet, put it in my webserver document directory under a directory called 'css' and restarted httpd and sympa.  However, sympa still includes the old location in the header of every wwwsympa request:
 ie. <link rel="stylesheet" href=""http://www.mydomain.com/sympa/css/style.css"
type="text/css" media="screen"/>

Wwwsympa would not serve this new css url in the web pages until I set the css_path parameter.  Once I set the css_path parameter, wwwsympa began serving the new style url with the document.

I looked through this list and saw that Oliver had recommended someone solve a similar problem by creating an alias in httpd.conf to point to the static style sheet instead of the dynamic one:
  e.g. Alias  home/sympa/css	 /css

And change the css_url parameter accordingly :
  e.g. css_url	   http://massey.ac.nz/css-sympa

I guess I do not understand the relationship of css_path and css_url;  It would seem that setting only the css_url and having wwsympa reference that url in each request would be enough to serve up the static style sheet to a web browser.  Why set the css_path or the web server Alias at all?
  




Archive powered by MHonArc 2.6.19+.

Top of Page