Skip to content
Browse files

Merge branch '0.2-template' of rad-dev.org:lithium into 0.2-template

  • Loading branch information...
2 parents baadd11 + eee4024 commit ee031873a8c8472e62a0c39cb2835bc10d433c26 @gwoo gwoo committed Nov 16, 2009
Showing with 13 additions and 0 deletions.
  1. +13 −0 libraries/lithium/template/readme.wiki
View
13 libraries/lithium/template/readme.wiki
@@ -18,6 +18,19 @@ The design decision behind using PHP's short echo syntax is because it's a
familiar syntax and it helps developers focus more on what data _should not_ be
escaped vs. what data _needs_ to be escaped.
+One special case situation to take _important_ note of, is the use of
+`<?=$this->foo()?>`. In this scenario, the code is translated to
+`<?php echo $this->foo(); ?>` rather than being filtered through `$h()` as with
+the former explanation. When direct access to a method or property on `$this` is
+contained in the shorthand syntax, it will be output as normal without being
+filtered. This is to make it easier to work with helpers that return markup.
+
+An example would be something like: {{{
+<?=$this->form->create();?>
+... my form here ...
+<?=$this->form->end();?>
+}}}
+
**Note:** `$h()` is the HTML escape function used in views.
**Note:** To output regular, unescaped text, use plain old `<?php echo ...; ?>`.

0 comments on commit ee03187

Please sign in to comment.
Something went wrong with that request. Please try again.