Skip to content

[Feature] A way to read out the view state #7

Description

@AaronLayton

We need a way of reading the matched state from a view aswell. I am thinking something like below that will just tell you what extension it should be looking for.

var state = ViewEnginePlus.State;

// state = "debug"
// state = "it"
// state = "dkk"
// state = "fr"
// state = "ie"

This way we can have an option where we just have the normal Index.cshtml but handle changes purely within the view.

var state = ViewEnginePlus.State;

if (state == "fr")
{
    <h1>Bonjour</h1>
} else {
    <h1>Hello</h1>
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions