[Catalyst] [Beginner] Understanding actions and controllers - not!

Ronald J Kimball rkimball at pangeamedia.com
Tue Oct 26 22:26:43 GMT 2010


 I'm catching up on list mailings, so I'm sorry about the delay on this
response.  I think an important point was overlooked here...

On Thu, Aug 26, 2010 at 5:50 PM, Ekki Plicht (DF4OR) <ep at plicht.de> wrote:

> Am Montag 23 August 2010, 23:17:40 schrieb Ben van Staveren:
> > try using /static/css/main.css ;)
>
> Yup, that did the trick.
> $c.uri_for() would have worked as well, as I have learned now (tnx Stuart=
).
>
> But why? :-)
> I mean, coming from years of traditional web development it's deeply
> ingrained
> not to use absolute paths. I would never have expected to have Cat meddle
> with
> my views in such a way.
>

This problem is not caused by Catalyst.  The document you're returning to
the browser contains a relative path to the CSS file:

<link rel=3D"stylesheet" href=3D"static/css/main.css" type=3D"text/css" />

The browser looks for that relative to the location of the current page.  If
the URL of the current page is http://www.example.com/foo/bar, then the
browser expects to find your stylesheet at
http://www.example.com/foo/static/css/main.css.

Ronald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20101026/1acaf=
2ad/attachment.htm


More information about the Catalyst mailing list