Search the Community
Showing results for tags 'paths'.
Found 3 results
I'm trying to make an AJAX call from within a template to a php script within my templates folder, but I'm getting a 404 from all URLs. Is there a proper way to directly address scripts within PW templates? I've read it will work in the site root, but I'd rather keep all the code together if possible.
I'm having some problems with css, include and image paths and wondered what the advice was for the location of following assets (folder in root) - scripts - images - css Currently I have it in the root but perhaps it should be located in the default site/assets/ directory which comes with PW? Reason I ask is because I have a templates folder with a homepage and basic-page template located at site/templates. Both files are located in exactly the same level but both require different paths for the CSS Homepage only works with <link rel="stylesheet" href="assets/scripts/foundation/css/normalize.css"> <link rel="stylesheet" href="assets/scripts/foundation/css/foundation.css"> <link rel="stylesheet" href="assets/scripts/foundation/css/foundation-custom.css"> <link rel="stylesheet" href="assets/css/styles.css"> Basic page only works if I add "../" before above <link rel="stylesheet" href="../assets/scripts/foundation/css/normalize.css"> <link rel="stylesheet" href="../assets/scripts/foundation/css/foundation.css"> <link rel="stylesheet" href="../assets/scripts/foundation/css/foundation-custom.css"> <link rel="stylesheet" href="../assets/css/styles.css"> I should probably make the above into a single include but I'd rather solve this mystery first.
Hope this is the right place for this. Following scenario: PW is running on my localhost: http://localhost/mysite when I insert an image into the textarea the path is like this: "/mysite/site/assets/files/1028/berlin.jpg" Then I changed to a development host name, which point to the same directory: http://mysite.dev Then all the inserted images do no work anymore, because obviously "/mysite/site/assets/" does not exists, it then should be "/site/assets/" Since the image path is written in this plain form into the db, this kind of inflexible. Any solution to this? Edit: It sure could be done easily with a .htacces rewrite: RewriteRule ^mysite/(.*) $1 but I'd consider this hacky then.