Skip to content

Add a way to provide a composite context with <% include %>#88

Open
tifosiblack wants to merge 1 commit intobaryshev:masterfrom
tifosiblack:master
Open

Add a way to provide a composite context with <% include %>#88
tifosiblack wants to merge 1 commit intobaryshev:masterfrom
tifosiblack:master

Conversation

@tifosiblack
Copy link

Hello Vadim,

I propose this pull request, in order to be able to pass a 'this' extended context through an include.

This way I'm able to include reusable component like that and still be able to use global headers, like translation, defined into 'this' :

<% include 'runtime/components/media', @, { media: @exercise.media } %>
<% include 'runtime/components/media', @, { media: @other.media } %>

Context is merge into a new object in this case. The behaviour is unchanged in other cases.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments