creating standalone HTML pages

Topics: Customizing Orchard
Oct 16, 2015 at 6:13 PM
Hey Guys,

I got a request to put up a static HTML page from a client. They sent over all the HTML/css files, and i wanted to implement this page independently of the current theme on the site. There will be more of these to come as well. What would be the best way to approach writing something that can be implemented easily repeatedly.
Oct 22, 2015 at 11:28 PM
I can't say this is the best approach, but a simple approach would be:
  1. Create a folder (example: MyStaticFolder) for the static files under the root of your web site.
  2. Enable your folder to serve static files by placing a web.config file into MyStaticFolder. The web.config specifies the static file handler as shown below.
  3. Place your HTML and CSS files into MyStaticFolder.
This way you can navigate to http://mywebsite/MyStaticFolder/yourfilename.htm and it will be served as expected.

<?xml version="1.0" encoding="UTF-8"?>
      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />

    <handlers accessPolicy="Script,Read">
      <remove name="StaticFile" /> <!-- Note: This line is required. -->
      <add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
Oct 26, 2015 at 4:14 PM
Thank you!

I knew there had to be a simple way to do it.