This project is read-only.

Add .chstml or .aspx page to Theme Contents folder

Topics: Writing themes
Aug 2, 2012 at 12:10 PM

Just trying to add a standalone .cshtml or .aspx to /MyTheme/Content folder 

Index.html works fine but Index.aspx or Index.cshtml do not show up - is there something else to be added? Or should the path be exactly to the .aspx .cshtml page?


Web.config in the Contents folder.

        <add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />


In Orchard.Web web.config


<handlers accessPolicy="Script, Read">
<clear />       

<!-- allow access to aspx and cshtml pages - before HttpNotFoundHandler which stops ALL requests  -->       
<add name="ASPX" path="*.aspx" verb="*" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode" requireAccess="Script"/>       
<add name="CSHTML" path="*.cshtml" verb="*" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode" requireAccess="Script"/>

        <!-- Return 404 for all requests via managed handler. The url routing handler will substitute the mvc request handler when routes match. -->       

<add name="NotFound" path="*" verb="*" type="System.Web.HttpNotFoundHandler" preCondition="integratedMode" requireAccess="Script"/>