Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
2 posts Page 1 of 1
Hi,
it might help somebody; I used the pretty URL as advised in the tutorial, but it didn't work with my CSS, Javascript and images as it should have, when still in relative path ("../images/logo.jpg").

But everything turned all right when I changed all to absolute path as:
http://www.mywebsite.com/images/logo.jpg
or
<link rel="stylesheet" type="text/css" href="http://www.mywebsite.com/css/style.css"/>

Just in case,
Ciao
Paolo
Thank you Paolo for the tip.

I'd like to add to your comment that using <cms:show k_site_link /> is always a preferable way of converting relative links to absolute ones. e.g.
<link rel="stylesheet" type="text/css" href="css/style.css"/>
can be made
<link rel="stylesheet" type="text/css" href="<cms:show k_site_link />css/style.css"/>
This way, your site becomes 'migration proof'.

BTW, this problem of relative paths breaking with prettyURls is not a Couch specific thing. It'll happen anywhere you use URL rewriting. It has been discussed in the docs at -
http://www.couchcms.com/docs/tutorials/ ... -ends.html

Thanks again.
2 posts Page 1 of 1