3

I am using Orchard CMS 1.8 and have created some polymer components. If I add the polymer components inside the Themes folder and access it using the syntax

RegisterLink(new LinkEntry { Rel = "import", Href = Url.Content("~/Themes/TheThemeMachine/components/font-roboto/roboto.html") });

in the layout page, all works fine.

Now I am trying to move these html components to a different project. I created a module for that and added these polymer html components there and I am trying to reference. It is not working.

RegisterLink(new LinkEntry { Rel = "import", Href = Url.Content("~/Modules/Polymer/components/font-roboto/roboto.html") });

I tried adding a script and style reference in my ResourceManifest (in my new module) and I was able to inject script and style using Script.Require and Style.Require.

I am not sure how to import htmls. Can anyone help me on this.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sumesh Kuttan
  • 1,333
  • 1
  • 17
  • 40

1 Answers1

1

Script and Style folder have a web.config file with a section that allows static files.

May be copy this file in your components folder to allow to display .html files.

Antoine Griffard
  • 1,019
  • 1
  • 9
  • 21
  • I got it working. I am not sure if my following explanation is the real reason or not. I had handlers for html in my config. However I had the same in a sub level config file as well. Seems using both together didnt work out. I removed the one from the sub level to the root level. Started working. – Sumesh Kuttan Feb 12 '15 at 11:59