Hi, I am a total beginner at Wix code here. Thanks for your patience with these questions.
How is Wix’s folder structure set up?
I am trying to run a simple script, called from an HTML Element on a certain page. That HTML code calls for a javascript that I have saved under the Public category on my site structure. But that javascript in the Public area of my site may also call for an .xml document in one location, a .swf file in another location, and images that I uploaded to a specific image folder.
So how do I access these different folders? I don’t know what Wix considers the top-level folder and where Wix sorts which documents when you upload images versus documents vs javascripts. Do any of these work?
“document.js”
“…/document.js”
“public/document.js”
“…/public/document.js”
“images/projectfolder/image.jpg”
“/projectfolder/image.jpg”
“…/images/projectfolder/image.jpg”
-Matt
Hi, Matt.
Just curious; have you tried those?
Simple question, but no, not yet, because this is a small piece of the larger effort. I am trying to load a krpano 360 tour (see krpano.com), and this relies on basically two javascripts, some xml references, and the cubemap images. It works on my local machine all in nicely organized subfolders, but within Wix I have to split up all the files in those folders because it does not seem possible to upload images in Wix into a folder directly underneath a javascript (I could be wrong), and Wix does not allow .xml files uploaded into an image folder. Therefore, nothing works yet because the internal javascript links are broken. So I’m trying to whittle away potential problems by at least getting the portions of the HTML code and javascript to correctly find the files so I can see what else does not work.
Thanks.
Wix Code does not support a file structure. This is due to security concerns as well as to protect against system abuse.
Feel free to post a Feature Request .
Dear Yisrael,
I do not mean that “Wix Code does not support a file structure”, rather, I am looking to understand Wix (not Wix Code specifically)'s FOLDER structure. A user is able to make subfolders within the Images upload area, so what is the correct syntax to access the files in these subfolders? For example, if the javascript is located in the Public area and needs to call ImageA.jpg, yet I have three different “ImageA.jpg” files that are in three different subfolders in the Image upload area, what syntax do I put into the javascript code to search for the proper folder? In other words, does the javascript need to go UP or DOWN a directory from where it sits in the Public category of my site structure to access the Image upload subfolders?
To run a krpano 360 panoramic tour, I am trying to recreate this folder structure from a local computer. However, Wix does not seem to allow mixing certain file types, so I assume I will have to rearrange certain files. I’m asking what syntax to use then to get to various directories.
Thank you for helping!
Matt