0

I am trying below

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

in my orchid layout, for using polymer. however this request is throwing a 404(on network tab in chrome.).

I am very much new to Orchid cms and hence struggling with this. Any help on this.

Note: I found that I have a class ResourceManager which implements IResourceManager. I am not sure if this is where I need to do make some changes. So adding this note as well.

Thanks

Sumesh Kuttan
  • 1,333
  • 1
  • 17
  • 40

2 Answers2

1

You need to place a web.config inside Themes/SomeTheme/components folder (same as ThemeMachine/Styles) making one modification:

<handlers accessPolicy="Script,Read">
      <add name="StaticFileHandler" path="*" verb="*" modules="StaticFileModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
    </handlers>

Remove (if existing) all web.config files in children folders.

urbanit
  • 473
  • 3
  • 9
  • 1
    thanks for this. It works. I found this out from http://stackoverflow.com/questions/9626611/placing-js-files-in-the-views-folder. I was about to update this as answer and found u. :) – Sumesh Kuttan Jan 13 '15 at 09:17
0

You really need a web server to host polymer assets unless you disable web security. It can be any web server server. In addition, the ~ directive probably wouldn't be recognized by chrome file loader.

lazieburd
  • 2,326
  • 2
  • 14
  • 12