Importing google polymer in Orchard cms

225 views Asked by At

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

2

There are 2 answers

1
urbanit On BEST ANSWER

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.

0
lazieburd On

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.