0

Looking at this thread it seems to me like its hardcoded ServiceStack razor default page

I tried looking into ViewEngine inside the Configure method but it does not Have the View engine like Asp.net does.

The goal is to be able to place all of my view inside this structure(View Pages)

/Static/Views/

Let me know if anyone knows.

Community
  • 1
  • 1
Alfredo Alvarez
  • 336
  • 3
  • 15

1 Answers1

1

Right, Razor Pages stored in the /Views folder are called View Pages and are executed in response to a Service - this convention is hard-coded in ServiceStack and can't be changed.

mythz
  • 141,670
  • 29
  • 246
  • 390
  • Probably out of place but if i make a pull with a way to change the folder does it have any chance ? – Alfredo Alvarez Feb 19 '16 at 02:57
  • @AlfredoAlvarez no, this is the most intuitive/expected place for the Views folder, it's a predictable convention that everyone should be able to rely on. – mythz Feb 19 '16 at 03:11
  • what I want is a way to change the folder.I get the convention and honestly it had work fine till today. I currently need it due to the fact that my js and views need to come from a subtree. So i wanted to be able to have a folder like /UI/Views and /UI/js so i put those in a separate repo. I guess i can handle the scenario making a batch file so it copies the subrepo then moves the files and another batch script to invert push to origin. But it seems dirtier. In asp.net you could do this if needed by setting paths on the ViewEngine. – Alfredo Alvarez Feb 19 '16 at 05:25
  • @AlfredoAlvarez I understand, but supporting this rare use-case weakens the built-in convention and its predictable behavior so any external tools can no longer rely on it. Customizations like this would devalue the feature. You can [submit a feature request](http://servicestack.uservoice.com/forums/176786-feature-requests) to measure the demand for this feature as without demand it's not a good feature to support indefinitely. – mythz Feb 19 '16 at 05:45
  • Cool that is what i needed was not sure what the process was. thanks for your time. Will submit the feature request. I will look into what takes to make it. – Alfredo Alvarez Feb 19 '16 at 15:47