Is there a way to get CakePHP's css method to emit a path relative to the current document?
I.e., using this code:
$this->Html->css('tutorial');
Instead of generating
<link rel="stylesheet" type="text/css" href="/Tutorial/css/tutorial.css" />
it would instead generate something like
<link rel="stylesheet" type="text/css" href="../../css/tutorial.css" />
I know this is goofy, but I'm looking to create something that can be retrieved using wget, then viewed offline. I've told CakePHP to handle .html extensions (using Router::parseExtensions('html');), then set up routes to the controller/action that look like a directory structure for static HTML files. I'm looking for a way to generate a URL that's relative to the page so that when I save the files (using wget) they'll still work when read from the hard drive.
As thaJeztah points out below, this isn't possible in CakePHP. Because CakePHP is abstractly mapping URLs to controllers & actions it does't really have any notion of 'serving a file' anymore (except in the /pages/subdirs, etc) so the only thing that makes sense for CakePHP is to provide a URL that starts at the root & works down to the .CSS files. (Much thanks to thaJeztah for pointing this out!)