namesco / ZTal

ZTal makes integrating the PHP templating system PHPTAL into Zend Framework easy.
Other
21 stars 3 forks source link

Ztal_Tal_View hides variables from the view #7

Closed nrwiersma closed 13 years ago

nrwiersma commented 13 years ago

Hi,

To start ZTal is awesome. I have found an issue when using contextSwitching. When setting a variable in the view ZTal takes over and sets the variable in the engine. This actually stops json context switching from getting the view variables.

to fix this add this line in class Ztal_Tal_View: public function __set($key, $value) { $this->_checkLoaded(); $this->_engine->set($key, $value); $this->$key = $value; <-- This puts the variable in the view and engine. }

Thanks, Nick

far-blue commented 13 years ago

Hello :)

I think we've managed to fix this in the dev branch. We've reworked how the view variables are managed so that the original Zend_View methods are used until the point of rendering where they are moved into the PHPTAL engine. Feel free to grab the dev branch (it is pretty stable) and see if it helps.

Robert

nrwiersma commented 13 years ago

Wow, that was quick.

I'll give that a try, Thanks.

nrwiersma commented 13 years ago

Seems to be the case. Can you tell me when the development branch will be released?

Thanks.

far-blue commented 13 years ago

We're not sure but hopefully April. I'm not aware of anything in the current Dev branch that would cause a site to blow up, however, so if you need the functionality a bit sooner maybe use the dev version for a few weeks.