Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix {link} rendering to allow passing a target.

  • Loading branch information...
commit 73bfae47d5f51f9e5f78ef44ae7db67b5d64c20a 1 parent 93ff71e
@kaecyra kaecyra authored
View
2  library/core/class.theme.php
@@ -95,6 +95,8 @@ public static function Link($Path, $Text = FALSE, $Format = NULL, $Options = arr
$Class = GetValue('class', $Options, '');
$WithDomain = GetValue('WithDomain', $Options);
$Target = GetValue('Target', $Options, '');
+ if ($Target == 'current')
+ $Target = trim(Url('', TRUE), '/ ');
if (is_null($Format))
$Format = '<a href="%url" class="%class">%text</a>';
View
1  library/vendors/SmartyPlugins/function.link.php
@@ -42,6 +42,7 @@ function smarty_function_link($Params, &$Smarty) {
if (isset($Params['withdomain'])) $Options['WithDomain'] = $Params['withdomain'];
if (isset($Params['class'])) $Options['class'] = $Params['class'];
if (isset($Params['tk'])) $Options['TK'] = $Params['tk'];
+ if (isset($Params['target'])) $Options['Target'] = $Params['target'];
$Result = Gdn_Theme::Link($Path, $Text, $Format, $Options);
Please sign in to comment.
Something went wrong with that request. Please try again.