update
This commit is contained in:
30
core/plugins/Smarty/function.url.php
Normal file
30
core/plugins/Smarty/function.url.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?
|
||||
/*
|
||||
* Smarty plugin
|
||||
* -------------------------------------------------------------
|
||||
* File: function.url.php
|
||||
* Type: function
|
||||
* Name: link
|
||||
* Purpose: zwraca sformatowany url
|
||||
* -------------------------------------------------------------
|
||||
*/
|
||||
|
||||
function smarty_function_url($param, &$smarty)
|
||||
{
|
||||
|
||||
if(isset($param['label'])) {
|
||||
$label = $param['label'];
|
||||
} else {
|
||||
$label = null;
|
||||
}
|
||||
|
||||
if(isset($param['_BASE_URL_'])){
|
||||
$baseUrl = $param['_BASE_URL_'];
|
||||
unset($param['_BASE_URL_']);
|
||||
return Router::GenerateUrl($label, $param, $baseUrl);
|
||||
}
|
||||
|
||||
return Router::GenerateUrl($label, $param);
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user