Skip to content

Initial idea #8

@AaronLayton

Description

@AaronLayton

This is the initial idea of how I think this should work. Replace the ViewEngine with ViewEnginePlus and then add rules as needed. The Debug one will probably be internally built in, with a way of adding specific domains to the test / debug list.

The themes will be built in just routing /views/<theme>/home/index.cshtml as needed

System.Web.Mvc.ViewEngines.Engines.Add(new ViewEnginePlus.RazorViewEngine());

ViewEnginePlus.AddRule("debug", new Func<bool>() => { 
    return Request.IsLocal() ? true : false;
});

ViewEnginePlus.AddRule("ie", new Func<bool>() => { 
    return Session["language"] == "ie" ? true : false;
});

ViewEnginePlus.AddRule("dk", new Func<bool>() => { 
    return Session["language"] == "dk" ? true : false;
});

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