On 04/14/11 08:42, Robert Goldsmith wrote: >> I am pretty new PHPTAL, and Zend Framework, but was happy to run accross >> ZTal. How do you get ZTal to use hyphenated view names (e.g. >> product-description.xhtml) instead of the CamelCasing it currently does? > Ztal doesn't use hyphenated view names. Honestly, I really don't understand > why Zend Framework does when it is so very strict with camelCase naming > elsewhere. However, along with the different extension, the use of camelCase > specifically highlights the templates as being not ZF view php files and > allows both Ztal/PHPTAL templates and ZF view php files to co-exist in the > same view folder structure. This is especially useful during migration as you > can simply turn Ztal on and off and compare output etc. > I believe the change came in ZendFramework 1.5, they use to allow camelCase script names, you can still use a filter to get it. Funny enough, I ended up changing View.php to allow me to turn on and off Ztal's naming conventions via the application.ini file. Now that I am thinking about it, perhaps the naming convention should have been handled using the Zend_Filter_inflector, this way, I could have overridden it in the same manner, without having to edit Ztal's code at all.
> Regarding a repository of useful tales, I'd be keen to see a (maybe optional) > download from the PHPTAL site with a collection of well written common tales > both to help developers writing their own and to provide a lot of convenient > functionality. The lack of some basic abilities will, I'm sure, be putting > people off of PHPTAL unnecessarily :( I would love to have somewhere, I could go and see if someone already created one. I remember someone doing a toHTML, and a nl2br in the mailing list. >> Of there is another problem I am having, in Zend Framework, if you don't >> want something to render, all you have to do is put this in it's action >> method, however, I am finding this doesn't work at all now since moving to >> ZTal can't figure out why: >> >> function exampleAction(){ >> >> $this->_helper->viewRenderer->setNoRender(); >> >> print "Hello world."; >> } > This mailing list really isn't the best place to discuss Ztal in detail but > I'd suggest if you tried to do this in the example app and it didn't work the > reason is that the layout is still rendered even when you request the view > not to. You can separately request the layout not to render as well or, if > you prefer (e.g. for debugging), just exit() from within the action method > (which will prevent rendering of any output and flush the current output > buffer out to the browser). > > Anyone interested in further discussion of Ztal can usually find myself and > the other Ztal developers in the #ztal irc channel (as mentioned on the ztal > website) during uk working hours :) > Robert > _______________________________________________ > PHPTAL mailing list > PHPTAL@lists.motion-twin.com > http://lists.motion-twin.com/mailman/listinfo/phptal _______________________________________________ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal