That just turns your CSS link into a relative URL, which won't work
at, for instance, /tgapp/controller/thing -- the browser will request /
tgapp/controller/css/style.css, which won't exist.

The quick hack solution is to edit your master.html template to use /
tgapp/css/style.css.  A more robust solution would be to store the
location of the root of your app in a config file somewhere, but I'm
not sure exactly how that works in TG2.  Perhaps someone else here can
chime in on that.


On Nov 13, 9:51 am, Kevin H <[EMAIL PROTECTED]> wrote:
> I've been messing around with TG 2 the last couple of days, and I
> noticed a minor issue.
>
> The following line appears in the master.html template:
>
>     <link rel="stylesheet" type="text/css" media="screen" href="/css/
> style.css" />
>
> Notice that the path starts with a "/".  This is fine when running the
> TG2 app alone (under "paster serve"), but makes the CSS file
> unfindable when running a more complex paste setup and running the TG2
> app as something other than the web root. (e.g. "/tgapp/")
>
> It's easily fixed (in my case at least) by removing the leading "/".
>
> I'm pretty new at using paste, so I wasn't sure whether this was a TG
> issue, or whether this should be handled in paste (using some config
> option I haven't learned yet).
>
> Is there something like the TG1 webroot option that needs to be set in
> the config file?  Or is this a tiny bug in teh template file?
>
> Kevin Horn

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to