incubator icon indicating copy to clipboard operation
incubator copied to clipboard

#12 cdn Bug

Open Cmssspl opened this issue 13 years ago • 10 comments

New it work, but not as expected! Do not load the file at the time of use, in modmencie call {{content ()}}! It can not be, method becomes totally not useful, it is better to use level layouts now!

And plzz change engine twig: https://gist.github.com/Cmssspl/4690638 I stated earlier this file, do not know why you use only one version, not the current one. :/

Cmssspl avatar Feb 07 '13 21:02 Cmssspl

ok! thanks! but the adapter has a bug! this part is missing: https://github.com/phalcon/cphalcon/blob/master/unit-tests/ViewEnginesTest.php#L81

ghost avatar Feb 07 '13 21:02 ghost

Hmmm, do not change the render (). This error is not related to problem # 12?

Maybe 35-37 line id bad or unnecessary for test? I am using this code, the only problem is # 12 -> bad fix -> # 13.

Ps. https://github.com/phalcon/incubator/blob/master/Library/Phalcon/Mvc/View/Engine/Twig.php has error...

Declarate: private function _registryFunctions($view)

Use: $this->_registryFunctions()

Wher is $view? ;-)

Cmssspl avatar Feb 07 '13 21:02 Cmssspl

I updated the adapter, can you check it out?

ghost avatar Feb 07 '13 21:02 ghost

https://github.com/phalcon/incubator/blob/master/Library/Phalcon/Mvc/View/Engine/Twig.php This?

_registryFunctions($view) need $view...

Ok, im change my file: https://gist.github.com/Cmssspl/4690638

You can use it instead of the current as a whole. He fixes a bug, does not enforce use {{content () | raw}} add method partial () and fix default value is not correct.

Edit: sorry. :P

Thx for speed fix. ;-)

Cmssspl avatar Feb 07 '13 22:02 Cmssspl

https://github.com/phalcon/incubator/blob/master/Library/Phalcon/Mvc/View/Engine/Twig.php#L28

Sorry, we don't speak polish :)

ghost avatar Feb 07 '13 22:02 ghost

Yes, this is error.

Look my gist.

Cmssspl avatar Feb 07 '13 22:02 Cmssspl

He wanted to know why you not added other changes?

  1. add partial()
  2. change default var
  3. is_safe

Cmssspl avatar Feb 07 '13 22:02 Cmssspl

I added other changes, please highlight me the exact lines I'm missing or please submit a pull request: https://help.github.com/articles/using-pull-requests

ghost avatar Feb 07 '13 22:02 ghost

https://gist.github.com/Cmssspl/4690638#file-twig-php-L32-L109

;-)

Cmssspl avatar Feb 07 '13 22:02 Cmssspl

ok I updated the whole method, thanks

ghost avatar Feb 07 '13 22:02 ghost