Jump to content

Included .js-script and wrong relative paths


atar
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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 by atar
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...