Skip to content

Commit

Permalink
Merge pull request #7 from mitydigital/fix/inline-defaults
Browse files Browse the repository at this point in the history
Tweak tag behaviour for manual and defaults
  • Loading branch information
martyf authored Jun 11, 2024
2 parents debb9d2 + 2410487 commit 4afb67d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Tags/Iconamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,16 @@ protected function _getIcon(?string $handle = null, bool $checkIconExistsOnly =
}

// manual mode
// is there an 'icon' and 'path' param?
if (! $icon && $this->params->has('icon') && $this->params->has('path')) {
// is there an 'icon'?
if (! $icon && $this->params->has('icon')) {
// load the raw file
$icon = $this->params->get('icon', false);
$path = $this->params->get('path', '');
$path = $this->params->get('path', null);

// if there is no path, get the default
if (!$path) {
$path = config('iconamic.path');
}

// do we have a path helper?
$pathHelper = $this->params->has('path_helper') ? $this->params->get('path_helper', 'default') : 'default';
Expand Down

0 comments on commit 4afb67d

Please sign in to comment.