Skip to content

Commit

Permalink
Changed absolute urls to relative ones to fix #38
Browse files Browse the repository at this point in the history
  • Loading branch information
Eworm committed Nov 20, 2019
1 parent ff07654 commit 18aee56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BigKahuna/BigKahunaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private function itemUrl($item, $locale)
return $item['url'];
} else {
if ($content) {
return $content->in($locale)->absoluteUrl();
return $content->in($locale)->url();
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions BigKahuna/BigKahunaTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private function getItems($pages, $locale, $root = true)
} else {
if ($content) {
$isactive = '';
if ($content->in($locale)->absoluteUrl() == $actual_link || $this->getChildActiveStatus($page, $actual_link)) {
if ($content->in($locale)->url() == $actual_link || $this->getChildActiveStatus($page, $actual_link)) {
$isactive = ' ' . $activeClass;
}
}
Expand All @@ -85,7 +85,7 @@ private function getItems($pages, $locale, $root = true)
} else {
// An internal link
if ($content) {
$html .= '<a class="' . $linkClass . $isParentLink . '"' . $parentAttributes . ' href="' . $content->in($locale)->absoluteUrl() . '" title="' . $myLinkTitle . '">';
$html .= '<a class="' . $linkClass . $isParentLink . '"' . $parentAttributes . ' href="' . $content->in($locale)->url() . '" title="' . $myLinkTitle . '">';
}
}

Expand All @@ -111,7 +111,7 @@ public function getChildActiveStatus($page, $actual_link)
foreach ($page['items'] as $child) {
$child_content = Content::find($child['id']);

if ($child_content && $child_content->absoluteUrl() == $actual_link) {
if ($child_content && $child_content->url() == $actual_link) {
return true;
} else {
return $this->getChildActiveStatus($child, $actual_link);
Expand Down

0 comments on commit 18aee56

Please sign in to comment.