Import HTML files into Sitefinity?
Hi there,
I got a request from user to post a HTML format document which includes a number of HTML files and CSS and Images folders. Is it possible to post this kind of document on Sitefinity?
Thanks,
Michael
Michael,
You have a couple of options here.
Overall, I would choose option #1 if you really had to keep the files themselves in tact, otherwise I would opt for option #3 and convert them to Sitefinity pages. Hope this helps.
Craig
Hi Craig,
Thanks so much! A couple of further questions. What exactly the root folder is? eg. C:\program files\Telerik\Sitefinity5.3 ? or ...Telerik\Sitefinity5.3\Projects\Default\App_data\Storage\FileSystem?
Another question is what URL will be used to access the pages by Internet users? www.example.com\folder(created under root)\index.html?
There's navigations in the html doc so it is not ease to convert to SF pages. So I think I need to go with option 1.
Thanks again.
Michael
Hello Michael,
In your case "root" is likely the "Default" folder. It should have the app_data, sitefinity, bin, lib, etc folders in them.
Regards,HI
I didn't see the answer to this question above -
Another question is what URL will be used to access the pages by Internet users? www.example.com\folder(created under root)\index.html?
I have created a new folder in my files directory. I individually uploaded each file into the folder (.jpg, .png, .html, .js, .css), but i can't figure out the url to view the index.html file.
can you provide any guidance?
thank you
Laura
Another question is what URL will be used to access the pages by Internet users?
www.example.com\folder(created under root)\index.html?
Hello Laura,
Thank you for contacting us.
You can see how this can be done in this article:
http://www.sitefinity.com/documentation/documentationarticles/designer-s-guide/page-templates/creating-a-template-using-master-pages
Following the instructions in the article you can transform your index.html into a master page to be used as a custom template (index.master). Then you can create a page in which for a template you can use your index.master:
Backend > Pages > Create a page
There in the section Template you select "Select another template" > "Use your own .master file"
This way your page will be visible as any other page of your Sitefinity project.
Regards,
Simeon Simeonov
Telerik
Hi Craig,
Thanks for your post. Could you help further by advising further regarding Option 1?
After copying HTML files into root folder, what URL should be used for public users to access those HTML files through the website?
I'm still experiencing this challenge and hope you or someone can help. It seems I'm not the only one experience this challenge.
Thanks,
Michael
Hello Michael,
I tested your scenario by adding custom html file inside a folder named “CustomPages” . This folder should be placed on the root level of your project – where is the web.config file. Then you can access it through the url similar to the following:
http://[My site]/CustomPages/pageFile.html
If this doesn’t work in your scenario please make sure that you don’t have any limitation of the allowed file extensions in your IIS. Please have in mind that we handle in a special way request coming from folders with a certain names (like “Sitefinity”, “Images”, etc) so this could restrict you for accessing your files.
Thanks Elena.
I tested but it didn't work out. Got the following error:
Server Error
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
Other than copying the HTML files into the folder created in the root folder, anything else should be done? Anything needs to be configured in IIS or Sitefinity for this?
Thanks,
Michael
Hi Elena,
I figured it out the reason that caused that error.
I was uploading the files at OS level instead of through Sitefinity. When I tried uploading files through Sitefinity, it worked well.
A little bit inconvenient with Sitefinity uploading because I had to select each file one by one. But it is okay as long as it works.
Thanks again!
Michael
Hi,
I am glad to hear that the problem is resolved.