dogs me. I changed the var in the foreach to row, but you also have to use
it in each variable assignment. Your example has '$page_id =
$this->escape($text->page);'.
Here's what it looks like now:
foreach($this->text as $row) :
if ($this->escape($row->page) == $this->escape($this->id)) {
$page_id = $row->page;
$content1 = $row->content1;
$content2 = $row->content2;
}
endforeach;
You don't need to escape with each var assignment, so you can just go ahead
and <?php print $content1; ?>, and the html renders fine.
I hope this helps out others newbies like me!
--
View this message in context: http://www.nabble.com/How-do-I-customize-the-escape%28%29-function-for-HTML-rendering--tp23283430p23295981.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论