Created
January 25, 2009 01:04
-
-
Save speedmax/51619 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ 'post_view' | zend_url postid: post.id }} | |
// url for post_view route | |
{{ 'Martel' | links_to_route 'user' username: 'martel' }} | |
// links_to_route helper filter | |
// outputs <a href="<?= $this->url(array('username' => 'martel'), 'user') ?>">Martel</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ZendUrlFilters extends HtmlFilters{ | |
# static instance of Zend View | |
static $View; | |
function zend_url($route, $options) { | |
return self::$View->url($route, $options); | |
} | |
function links_to_route($title, $route, $options) { | |
$url = self::zend_url($route, $options); | |
return self::links_to($title, $url, $options); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment