Hi there,
I’ve been having some problems with file paths.
I have been developing the parsefile and added some javascript for rollover images and css.
When I included the css and javacript as separate files matrix would set the src as
http://mydomain/mydesignname/file.css
http://mydomain/mydesignname/file.css
so I embedded the code in the html and all works fine.
so now the javacript in the <a> tag looks like
eg:
<a href="/about/" onMouseOver=“MM_swapImage(‘about’,’’,‘mysource_files/menu-about-over.gif’,1)” onMouseOut=“MM_swapImgRestore()”>
when viewing the output source the path to the rollover image as
http://mydomain/mydesignname/file.css
and the path to the base image as
http://mydomain/mydesignname/file.css
I must be missing something to do with paths here.
Thanks Jarrod.
The paths are dependant on the status and permissions of the assets in question. In your example, the menu-about.gif is Live with Public Read access, while the menu-about-over.gif is either Not Live (essentially, any other status besides Live) or doesn't have Public Read access.
A Public Read/Live file/image asset gets the __data/assets/… style of path (which is handled by Apache natively). Anything else gets a Matrix URL, so we can test permissions/asset status on load.
Hope that makes things a bit clearer.
Thanks very much for that,
a silly oversight on my part. 