W dniu 30.09.2010 19:37, Kornel Lesiński pisze:
On 30 Sep 2010, at 18:28, Piotr Kroczyński wrote:

Ok thank you for reply. I have just one more question. In which revision is 
that diry quick fix that you wrote earlier to make PHPTAL write doctype after 
clone? I just added this to svn:externals in place of 1.2.1:
r993

phptal -r 939 https://svn.motion-twin.com/phptal/trunk/classes/ to svn externals
Wrong revision number.

But problem is still there. Can you tell me where and what to add to fix this 
bug ?
The fix is in PHPTAL_Context::setDocType(). Sets it in current context, rather 
than topmost context. I'm not sure if that is sufficient in all cases, but 
passes test case you've sent me (which I've added to tests in r991).

Sorry, I had good revision number but made mistake typing it in email :). Error remain, but maby it is somehow Zend Framework fault. I'm using Zend_View_Helper_Action to make something like widgets on my webpage:

///////////////////////////////////////////////
<div id="menu">
<span tal:replace="structure php:actionHelper.action('widget-menu', 'page', 'page')" />
</div>
....
<div id="login-form">
<span tal:replace="structure php:actionHelper.action('widget-login-form', 'auth', 'user')" />
</div>
....
<div metal:define-slot="content">
<!-- page content here -->
</div>
....
<div id="right-col">
<span tal:replace="structure php:actionHelper.action('widget-letest-news', 'news', 'news')" />
</div>
....
////////////////////////////////////////////////

This helper clones controller object (all properties are cloned also so view is cloned too), then execute method and returns generated content (using output buffering I suppose). I use PHPTAL to generate html in those actions. Maby somewhere there is problem. Templates that actions use are quite simple. There is no doctype, html, body etc. Just something like that:

//////////////////////////
<div tal:conditon="news">
<ul tal:repeat="n news">
<li>.....</li>
</ul>
</div>
///////////////////////////

I'll try try understand and modify PHPTAL to get it working. Maby I'll suceed, then I'll write how I did it :). If not then I'll wait for you to do it :) Thank you for help :) Cheers.




_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to