solidusjs / solidus

A simple server that generates pages from JSON and Templates
MIT License
28 stars 7 forks source link

Partials can't access their own resources/context #36

Closed pushred closed 11 years ago

pushred commented 11 years ago

When a partial is inserted into another view, the partial view's context is unavailable to itself. It may only access the parent view's context. It should be able to traverse up each parent view, accessing each context wherever keys are unique. Wherever the partial view's context defines a key of the same name, it should be treated as an override.

Fauntleroy commented 11 years ago

No (difficulty).

Right now we're using the normal layou/partial/view system from https://github.com/ericf/express3-handlebars. Something like this would require manually including partials with some new methodology, and that would require writing our own view system (much like we have in Storyteller).