[Cartoweb-users] non-cartoweb CSS file location

Oliver Christen oliver.christen at camptocamp.com
Mon Jun 23 02:22:49 EDT 2008


Hi

putting the file in cartoweb3/projects/myproject/htdocs/css is the right 
thing to do

BUT you need to run the cw3setup --install command so the new extra files 
are linked(linux)/copied(windows) in the main htdocs/ folder.

this is also the case when you override an existing css, js, img or template 
file

using a namespace for the various ressources in CW would certainly have been 
a good thing but it's effectively too late now without totally breaking 
backward compatibility.
This was taken into account for Mapfish though.

regards
Oliver

----- Original Message ----- 
From: "Chris Duncan, GISmatters" <duncan at gismatters.com>
To: "Cartoweb Users" <cartoweb-users at lists.maptools.org>
Sent: Friday, June 20, 2008 9:06 PM
Subject: [Cartoweb-users] non-cartoweb CSS file location


> Is it correct that if I want to use a CSS file that has nothing to do with 
> Cartoweb (for example, it styles the website's "skin" in which I'm 
> embedding a Cartoweb application), I just put that CSS file directly into 
> the cartoweb3/htdocs/css folder?
>
> That appears to be the way I have to do it, but it seems inconsistent with 
> Cartoweb's project customization approach. I first expected that I should 
> put the custom CSS file into cartoweb3/projects/myproject/htdocs/css, 
> along with my other Cartoweb-override CSS files; but if I do that, it 
> doesn't get copied to the main htdocs/css folder as I expected, and it 
> certainly doesn't get used (it's outside the web server's root folder).
>
> So, I'm just looking for clarification that I'm doing it right, or making 
> a suggestion to improve the consistency. The way it is now (if I've 
> understood it correctly), I cannot keep all of my project files under my 
> project folder... at least this one CSS file has to live in the live 
> htdocs/css folder, which makes it more difficult to manage my project 
> files, backups, portability, etc. because they are not all under one 
> project directory.
>
> I should also say that the reason I need this file in the Cartoweb 
> universe is that there were a number of collisions of CSS ids and classes 
> between this CSS file and some of the Cartoweb CSS files. Also, I do not 
> have control over the rest of the website -- I'm just developing a single 
> page with their skin and a Cartoweb application. Therefore, I had to take 
> one of their CSS files and rename some of the classes and ids to avoid 
> collision with the Cartoweb names, and now I consider it a part of my 
> Cartoweb project and want to keep it with the other project files.  Am I 
> making sense?
>
> It's probably too late now, without breaking lots of Cartoweb apps, but it 
> would be a good practice to use a prefix (e.g., "cw_") in CSS files as 
> well, so you don't have generic CSS entities like "content"... they should 
> be "cw_content", etc.
>
> Chris
>
> -- 
>
> Chris Duncan, Ph.D.
> President
> GISmatters
>
> duncan at GISmatters.com
> http://www.gismatters.com/
>
> 1 Tuckerman Ln
> Amherst, MA 01002
>
> Tel: 413-549-2052
> Fax: 508-637-2557
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 



More information about the Cartoweb-users mailing list