Where is the best place to store LOCAL html files for the web browser. Is there a place in the folder structure I can reference with relative URLS? I have HTML5 files, but no internet access. Thanks!
Here is a copy of my answer on support. Let’s keep only this thread alive so that all IntuiFace users can take benefits from this discussion.
The best solution is to use an Excel file to list all the local HTML files you want to use in a Web Browser asset.
I added a new section here to the Web Browser article.
At the moment, you can use filters to “select” the HTML you want to display and bind your home page on the row 1 of the Excel file (row 1 = result of filter when only 1 item fits).
In the IntuiFace version expected this week (5.6.4) you should also be able to call the Open URL action, using the values from your Excel file as a parameter.
I will add a small sample on the Web Browser article demonstrating this usage when the release goes out.
I don’t suppose there is a step by step tutorial out there,
as I only want to link one local HTML.
Also where would one actually place the folder containing the HTML
file and supporting assets.
Hello. I solved this by using the web browser asset, and in the Home Page field in properties, using a local file path:
If you drag and drop the HTML file onto your scene, it will create and place the file in the “Web” folder inside the project “Files” directory (…Intuiface[Project]\Files\Web).
You can then copy any supporting files into the Web directory.
FYI - If you plan on publishing the Experience using the Management Console, you’ll need to edit the IFX file manually to add any missing supporting files…
Hope this helps.
Thanks Alex. Can you clarify what you mean about updating the IFX file manually for the missing files? If you copy them into the WEB folder you mentioned, wouldn’t the HTML file automatically pull the files it needs?
Yes, if you copy the files into the web folder, they will be available to your browser asset.
What I was giving you a heads up about, if you plan to publish your application using the Management Console, not all files are sent up automatically to the server during the publishing process. You’ll need to manually add those files so they are included in the published application.
You’ll be fine if you just copy the entire folder from your Composer to your Player machine, but if you plan on deploying through the cloud, you’ll run into this scenario, like we did…Just trying to save you a few hours of figuring out why the XP works great on your machine but not on the player.
Good luck with your project.
Is it possible to use relative URLs for the folder it is stored in? Or do we need the full file path?
Right now I have the file path listed as:
But I would like to use a relative path if it is stored in the web assets folder:
Just seems to make it easier to transport and set up the experience on other machines. Otherwise, I have to make sure those machines are set up with identical user/folder path structures.
In order to use relative path…I had to drag the html page to my XP. It created a Web Asset.
I then had to update the IFX file. If you look at your IFX file and find the web asset, you’ll find something like this:
> Asset Name=“index” Visual=“DefaultWebBrowser” Style="" Container=“Static” ContainerStyle="" Domain=“value:WebBrowser”>
Property Type="Domain" Name="Source">![CDATA[player://resources/6033bcee-a9cf-48bc-b9eb-a31847978ec6]]></Property>
You’ll need to add a property for home page that points to that source…
Property Type=“Domain” Name=“HomePage”>![CDATA[player://resources/6033bcee-a9cf-48bc-b9eb-a31847978ec6]]>
Just cut and past the source line and replace the Name with “HomePage”.
You’ll be able to move this XP to any machine and it will use the relative path of the XP.
Keep in mind that if you do this, you cannot change the property in Composer and, at Play time, you won’t be able to change the address dynamically through actions or bindings.
Hope this helps.
Thanks for the help Alex! Wow, that’s a lot of work. I have 50 customs web pages built with spin sets, so each index.html file has its own folder and assets. Wish you could just put the relative path based from the WEB folder into the URL bar in Experience. That would be nice and easy.
Not sure if you have 50 folders or how you have it set up…But, you can put sub folders under the Web folder. You can link to the relative subfolders through html. If you want to change the home page to a different “index.hml” you can actually create a new “Resource” in your ifx file for all your new “home pages” then change them thru the “change home page” trigger.
Again, copy and paste the “index.html” resource, then change the key and relative indexpage.
<Resource Key="6033bcee-a9cf-48bc-b9eb-a31847978aaa" Type="uri" Length="167" LastModificationDate="2016-12-09T17:05:54.0008725Z" Archive="SmallFiles.zip" DefaultValue="player://data/Web/Sub/insub.html" />
Hope this helps.
Seb, I got the EXCEL idea to work, so thank you for that! Unfortunately, I have two browsers side by side on the same page opening different URLs for comparison. So if I set the filter on one browser, it sets is on the other. I guess I could have one EXCEL sheet for every URL I need.
BUT, best option would be to just be able to put a relative URL path in the HOME URL field in the WEB BROWSER asset. Simple and intuitive. Maybe the next build.