ZF-Commons / ZfcTwig

Zend Framework 2 Module that provides a Twig rendering strategy
BSD 3-Clause "New" or "Revised" License
96 stars 55 forks source link

How do I access the 'current' namespace or module name from within a ZfcTwig layout? #39

Closed Saeven closed 11 years ago

Saeven commented 11 years ago

Thanks for your help.

spiffyjr commented 11 years ago

Are you wanting the Twig namespace or the ZF2 module that the script resides in?

Saeven commented 11 years ago

The module the script resides within, precisely.

Thanks!

Scribbled on my iPhone

On 2012-11-27, at 20:05, Kyle Spraggs notifications@github.com wrote:

Are you wanting the Twig namespace or the ZF2 module that the script resides in?

— Reply to this email directly or view it on GitHub.

cosmin-harangus commented 11 years ago

Not sure you can, probably short of extending Twig with a new tag and setting the namespace at the beginning of the view file.

spiffyjr commented 11 years ago

You would have to somehow inject the module namespace into the view. Perhaps via a listener? This isn't really a Twig question as much as a ZF2 question.