On Tue, 15 Jun 2004 10:29:09 -0400, Nicolas Lamirault lam@tuxfamily.org wrote:
for tbnl i make this now :
(defun clwl-start () "Load configuration file, create a SQL database handler, and initialize the tbnl dispatcher for Clwl" (setf *conf* (load-config "/home/nlamirault/src/clwl/clwl.conf")) (setf *db* (get-database-connection *conf*)) (setf *dispatch-table* (nconc (mapcar (lambda (args) (apply #'create-prefix-dispatcher args)) '(("/tnbl/clwl/login.html" login) ("/tbnl/clwl/about.html" about) ("/tbnl/clwl/" main) )) (list #'default-dispatcher))) (start-tbnl))
(defun clwl-stop () (setf *conf* nil) (setf *db* nil) (setf *dispatch-table* nil) (stop-tbnl))
so i can load clwl very quickly with asdf operations and (clwl:clwl-start)
i use html-template to load the html template file, and create my web page (with data contained in sql database) but in fact i have a problem of CSS ...
for exemple this page : http://localhost/tbnl/clwl/index.html this page is correcte but css isn't load
i have this on the HTML template :
<link rel="stylesheet" type="text/css" href="templates/advogato.css" />
and my architecture is like this :
~/src/clwl/ *.lisp templates/ *.css *.html
~/public_html/tbnl/clwl <-- a link towards : ~/src/clwl/
i a write this in the template :
<link rel="stylesheet" type="text/css" href="templates/advogato.css" />
there is no change :( i don't really understand any help ?
I suppose you have Apache configured to delegate all pages below /tbnl/ to TBNL. As index.html is at /tbnl/clwl/index.html the address of the style sheet resolves to /tbnl/clwl/templates/advogato.css which is fed through TBNL which serves MAIN. (You can verify this with something like Ethereal. Or you can add a LOG-MESSAGE form to the MAIN function which logs the SCRIPT-NAME the browser requested.)
The easiest way to solve this problem is to give static pages their own root independently of TBNL, something like this:
<link rel="stylesheet" type="text/css" href="/static/templates/advogato.css" />
Ps : i'm on #lisp, nickname : lam
I usually don't have time for IRC... :)
(If I'm there - very rarely - I'm nhabedi.)
Cheers, Edi.