Quantcast
Channel: Using Optimizely Platforms
Viewing all articles
Browse latest Browse all 8020

Custom ContentProvider routing issue

$
0
0

We've made a custom ContentProvider for listing a document structure from Sharepoint. 

Since the structure is outside the asset root, according to some examples you can add routes for it like we're doing in an IInitializableModule:

RouteTable.Routes.MapContentRoute(
                name: "Sharepoint",
                url: ProviderName + "/{node}/{partial}/{action}",
                defaults: new { action = "index" },
                contentRootResolver: s => fileRoot.ContentLink);
RouteTable.Routes.MapContentRoute(
                name: "SharepointEdit",
                url: CmsHomePath + ProviderName + "/{language}/{medianodeedit}/{partial}/{action}",
                defaults: new { action = "index" },
                contentRootResolver: s => fileRoot.ContentLink);

This works fine in Edit-mode, we can download the documents from there, but in View-mode we get 404. 

The URL we're trying to access (as it appears by for instance dragging a file into a XHTML-property looks like this: /sharepoint/rovvilt/sno-rovviltkontakter/rovviltkontakter.xlsx which is correct according to the document structure.

Any hints would be appreaciated!


Viewing all articles
Browse latest Browse all 8020

Trending Articles