diff --git a/Block/NodeType/CustomUrl.php b/Block/NodeType/CustomUrl.php
index 37e94db7..5032c430 100644
--- a/Block/NodeType/CustomUrl.php
+++ b/Block/NodeType/CustomUrl.php
@@ -112,4 +112,29 @@ public function getLabel()
{
return __("Custom Url");
}
+
+ /**
+ * @param int $nodeId
+ *
+ * @return string
+ */
+ public function getCustomUrl($nodeId)
+ {
+ $node = $this->nodes[$nodeId];
+ $nodeContent = $node->getContent();
+ $url = '';
+
+ if (
+ $nodeContent
+ && $nodeContent !== '#'
+ && stripos($nodeContent, 'javascript:void') === false
+ && !$this->isExternalUrl($nodeContent)
+ ) {
+ $url = $this->_storeManager->getStore()->getBaseUrl() . ltrim($nodeContent, '/');
+ } else {
+ $url = $nodeContent;
+ }
+
+ return $url;
+ }
}
diff --git a/view/frontend/templates/hyva-menu-footer/menu/node_type/custom_url.phtml b/view/frontend/templates/hyva-menu-footer/menu/node_type/custom_url.phtml
index ca44f36a..fc886315 100644
--- a/view/frontend/templates/hyva-menu-footer/menu/node_type/custom_url.phtml
+++ b/view/frontend/templates/hyva-menu-footer/menu/node_type/custom_url.phtml
@@ -12,15 +12,15 @@ $imageUrl = $block->getImageUrl();
$imageAltText = $block->getImageAltText();
$imageWidth = $block->getImageWidth();
$imageHeight = $block->getImageHeight();
-$content = $block->getContent();
+$url = $block->getCustomUrl($nodeId);
$title = $block->getTitle();
$dataAttribute = 'data-menu="menu-' . $nodeId . '"';
$nodeClasses = $block->getNodeClasses();
?>
-
+
- getTarget()): ?>
@@ -36,7 +36,7 @@ $nodeClasses = $block->getNodeClasses();
/>
- getTarget()): ?>
@@ -36,7 +36,7 @@ $nodeClasses = $block->getNodeClasses();
/>
-
>
= $block->escapeHtml($title); ?>