November Happy Hour will be moved to Thursday December 5th.

PartialRouteData not mapping to atual path of the content media

Vote:
 

I am trying to make shorter URL for my file in EpiServer

Just want to use the URL ../ file/filename.

I have implemented using Partial Route Data by implementing  IPartialRouter interface

return new PartialRouteData
{
BasePathRoot = ContentReference.RootPage,
PartialVirtualPath=content.name

}

Could you please help,how to map partial route data to actual file path which is hierarchical folder structure in episerver?

../globalassets/foldername/foldername/filename

#224123
Jun 11, 2020 14:36
Vote:
 

One word answer: don't 😉

To elaborate, I would definitely advise against this. If you really, really want to, I think your best bet would probably be to use Epi Search & Navigation to retrieve the asset with that name. Having said that, you're also going to run into issues if you have any assets that have the same name.

#224124
Jun 11, 2020 16:54
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.