Comments (6)
Twig has an addGlobal()
method for this.
from zend-expressive.
@akrabat - I missed that when we were updating the twig implementation.
Could you maybe do a PR or open an issue against
zend-expressive-twigrenderer to use that instead of the current approach?
On Oct 11, 2015 6:07 AM, "Rob Allen" [email protected] wrote:
Twig has an addGlobal() method for this.
—
Reply to this email directly or view it on GitHub
#142 (comment)
.
from zend-expressive.
Looking at how zend-expressive-zendview is implemented, I'd say that the way the Twig one is done is correct as this way we have per-template default parameters which isn't supported by Twig's addGlobal
.
However, I don't see a way to add a parameter to every template as per the example in this issue?
from zend-expressive.
Ah - there's a weird template name called "TEMPLATE_ALL"… I would never have guessed that!
from zend-expressive.
Evidently I need to make that more prominent in the docs... Any suggestions?
We could still have that proxy to twig's global, while providing the
abstraction for per-template. Thoughts?
On Oct 11, 2015 1:20 PM, "Rob Allen" [email protected] wrote:
Ah - there's a weird template name called "TEMPLATE_ALL"… I would never
have guessed that!—
Reply to this email directly or view it on GitHub
#142 (comment)
.
from zend-expressive.
Closed with #143
from zend-expressive.
Related Issues (20)
- Documentation for aggregating middlewares per host
- handler:create produces template in wrong location HOT 2
- 3.01 ConfigProvider class not imported HOT 1
- Modifications on the request's path are lost in expressive 2.2 and 3 when done in path-specific middlewares HOT 2
- Several selectable DI Containers do not implement Interop\Container, causing an error in Zend Expressive 3 HOT 2
- Problem with ApplicationConfigInjectionDelegator and Auryn HOT 2
- PHP-DI - Container -Suggestion HOT 4
- composer require zendframework/zend-expressive broken HOT 3
- It was debug difficult of an error occurred by after handle pipeline HOT 2
- ./vendor/bin/expressive Windows 10 HOT 1
- Empty response with WhoopsErrorResponseGenerator and zend-expressive-swoole HOT 1
- default_suffix HOT 3
- Subdirectories HOT 1
- Factory backed pipelines cannot be composed/nested in other pipelines HOT 3
- NotFoundHandler generateTemplatedResponse Content Type missing HOT 2
- Path segregation - pipeline middleware - config-driven HOT 4
- Unable to handle errors in v1 HOT 3
- Typo in the docbloc HOT 5
- Zend Expressive vs Zend Framework 3 vs Zend Apigility for REST API with Swagger docs? HOT 3
- Angular 8 CORS error and Missing POST data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zend-expressive.