Skip to content

Instantly share code, notes, and snippets.

@danmatthews
Created March 2, 2012 17:58
Show Gist options
  • Save danmatthews/1960059 to your computer and use it in GitHub Desktop.
Save danmatthews/1960059 to your computer and use it in GitHub Desktop.
Smarty plugin to use Fuel's Uri::create() functionality in templates.
<?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