atar Posted December 30, 2015 Posted December 30, 2015 Hey everyone! I am trying to set up my first website with processwire and bootstrap, but I am facing a little problem: My template file includes a _footer.inc at the end of the page. In the _footer.inc there is a line that says: <script src="<?php echo $config->urls->templates?>assets/js/docs.min.js"></script> Up to here, everything works great thanks to <?php echo $config->urls->templates?> But, the docs.min.js file has another path in it: moviePath:"/assets/flash/ZeroClipboard.swf" What results in: domain.de/repair/assets/flash/ZeroClipboard.swf not found (404) because the file in in fact stored in domain.de/site/templates/assets/flash/ZeroClipboard.swf Is there any easy way to config e.g. processwire, to tell it that all the files are stored in the template folder? Btw.: I don't want to write the full path in the source-file, thats a bit ugly i think. Thank you very very much in advance!
cstevensjr Posted December 30, 2015 Posted December 30, 2015 What happens if you copy the ZeroClipboard.swf file to the /repair/assets/flash/ directory?
szabesz Posted December 30, 2015 Posted December 30, 2015 How about using <base href="<?php echo $config->urls->templates?>"> as the first child of the <head> tag? In this case you only need: <script src="assets/js/docs.min.js"></script>
atar Posted December 30, 2015 Author Posted December 30, 2015 @steven: It would work, but i would prefer to store the files in the templates folder @szabesz: I will try that and tell you if it works for me. Thank you a lot for your answers so far!
atar Posted December 30, 2015 Author Posted December 30, 2015 (edited) Thank you a lot! It works now, as long as I use the <base>-tag and also change moviePath:"/assets/flash/ZeroClipboard.swf" to moviePath:"./assets/flash/ZeroClipboard.swf" That's good enough for now Edited December 30, 2015 by atar
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now