Created
March 2, 2012 17:58
-
-
Save danmatthews/1960059 to your computer and use it in GitHub Desktop.
Smarty plugin to use Fuel's Uri::create() functionality in templates.
This file contains 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 | |
/* Save this file to /Fuel/app/vendor/Smarty/lib/plugins/function.create_url.php | |
* You can then call it like {create_url url="controller/action"} in your templates. | |
*/ | |
function smarty_function_create_url($params, &$smarty) | |
{ | |
return Uri::create($params['url']); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment