Skip to content

Commit

Permalink
Merge pull request #3 from derekisbusy/main
Browse files Browse the repository at this point in the history
Add linkTemplate option to item
  • Loading branch information
hail authored May 25, 2022
2 parents 35beb71 + d0952e7 commit bc94243
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected function renderItem($item)
$treeFlag = '<i class="right fas fa-angle-left"></i>';
}

$template = ArrayHelper::getValue($item, 'template', $this->linkTemplate);
$template = ArrayHelper::getValue($item, 'template', (isset($item['linkTemplate']))? $item['linkTemplate'] : $this->linkTemplate);
return strtr($template, [
'{label}' => strtr($this->labelTemplate, [
'{label}' => $item['label'],
Expand Down

0 comments on commit bc94243

Please sign in to comment.