Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for custom Views location #23

Conversation

RosenPetrovFFW
Copy link
Contributor

Hello,

We have a case where we use a custom Views location and this is not supported ATM, so I decided to create this PR.

In between, I noticed some potential improvement in the Context Culture configuration and added a commit for this as well.

#H5YR

…bility of the logic

There was some repetitive code and not needed double set of the context culture in the BackOfficeGridPreviewService.cs
Introduced BlockPreviewOptions which work with the Options pattern and can be configured both from appsettings.json or from code in the Startup.cs
@rickbutterfield
Copy link
Owner

@RosenPetrovFFW this looks great! I'll add a note to the README as well about overriding, just writing it here so I've got it somewhere...

"BlockPreview": {
    "ViewLocations": {
        "BlockList": ["/path/to/views.cshtml"],
        "BlockGrid": ["/path/to/views.cshtml"]
    }
}

@rickbutterfield rickbutterfield merged commit 2b5eebd into rickbutterfield:develop Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants