I tried these suggestions out and I thought I'll post my findings for
everyone else's benefit.
> Not really. One thing to note, if you put a trailing space following
> your closing PHP tag and then do a newline, you'll get the newline:
>
> <?php echo $this->headTitle() ?> <!-- space precedes... -->
>
> If you would like to see the PHP_EOL appended by default, please file a
> feature request in the tracker.
This does work and is very useful but it does mean that I get a space at the
end of each line. I can live with this for the moment but would prefer a
PHP_EOL so I'll submit a feature request.
> It's already possible. Use the setIndent() method, and pass it a string
> with a tab:
>
> $this->headScript()->setIndent("\t");
This again is great. Although I see from the source of some of the helpers
(HeadMeta etc.) that the output is prefixed with the indent as well. I don't
personally think this is needed as I like to set my initial indent in my
.phtml file to assist with readability in those.
> $this->view->escape($text);
>
>The $view public property is registered by default when extending
>Zend_View_Helper_Abstract.
Pretty obvious really! I can't believe I didn't think of this. I guess I've
been writing too many $this->escape($text) in my view templates which don't
require the ->view! Thanks!!
--
View this message in context: http://www.nabble.com/Standard-Placeholders-tp22455713p22463127.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论