skttl / ParameterEditorGenerator

Generate parameter editors from data types in Umbraco
MIT License
2 stars 2 forks source link

Virtual directories are not supported. #1

Open studenikin opened 6 years ago

studenikin commented 6 years ago

The package doesn't work with URLs like these:

http://mysite.com/v1/umbraco http://mysite.com/v2/umbraco

dawoe commented 6 years ago

This can be relatively easy fixed.

What you need to do is register your api url in the server variables;

See this example https://github.com/dawoe/umbraco-tour-editor/blob/develop/Source/Our.Umbraco.TourEditor/UmbracoStartup.cs#L41

Then you can use that in your angular code. https://github.com/dawoe/umbraco-tour-editor/blob/develop/Source/Our.Umbraco.TourEditor/Web/App_Plugins/TourEditor/scripts/resources/tour-resource.js#L6

That way you always return correct url

studenikin commented 6 years ago

Thanks, Dave!

Could you clarify we are on the same page? We are talking about the ParameterEditorGenerator package, right?

The links above refer to another package - TourEditor. This confused me a bit :-)

dawoe commented 6 years ago

Yes..the links refer to another package as example / guidance

studenikin commented 6 years ago

Ok, I see.

It should help on the client side big time.

Is there any trick for fixing URLs on the server side?

For example, there's hardcoded url "/App_Plugins/skttl.ParameterEditorGenerator/view.html" in the ParameterEditorGeneratorTreeAction.cs

In our case it should be "/v1/App_Plugins/skttl.ParameterEditorGenerator/view.html".