Skip to content

Context passed to helpers #339

@fhogberg

Description

@fhogberg

Since a lot of code for .net is based around viewcontexts it would be great to be able to pass a viewcontext to a template so that i can get a reference to it from helpers.
The function could be that any data passed to render would be accessable to helpers as a sort of state object.
Since templates compile to a Func<string,object> no passing of other things then.
Don't think this is possible now. Am i wrong?
Would it be regarded as in scope for this project?
Would you accept a pull request for it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions