There's no way to override the context value from an inline parameter.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 461
- PR merge metrics
- No merged PRs in 30d
Description
I've recently run into a case where I want to override some of my context to control the appearance of a partial.
The partial has a simple reference: `{theme}`, and I had attempted overriding it by adding the inline parameter to the partial include: `{> mypartial theme="sky"}`.
I can see why the decision was made to override this value from the context; It facilitates setting up default values when the context doesn't have the necessary data.
Can we consider adding the ability to allow the inline parameter to override the context? I had two approaches in mind:
1. Add a decorator/extension to the inline parameter definition to say "I want this value to override the context."
2. Add a filter/decorator to the reference inside the partial to say "I want to use the inline parameter value if it exists, then the context."
Thoughts?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Review how inline parameters, partial references, and context values are resolved, then define the intended precedence between them and add tests covering the chosen behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100