vapor / template-kit

📄 Easy-to-use foundation for building powerful templating languages in Swift.
MIT License
46 stars 17 forks source link

1.1 release #34

Closed tanner0101 closed 6 years ago

tanner0101 commented 6 years ago

This PR allows for userInfo to be passed to render calls. Related to #28.

return req.view().render("welcome", ["name": "Vapor"], userInfo: ["foo": "bar"])

You can then access this userInfo in TagRenderer.

final class FooTag: TagRenderer {
    func render(_ tag: TagContext) -> ... { 
        print(tag.context.userInfo["foo"])
    }
}
penny-coin commented 6 years ago

Hey @tanner0101, you just merged a pull request, have a coin!

You now have 842 coins.