Welcome message = "Welcome Sign-in".
I want to add my account link on Sign-in text in the welcome message. sign-in text should be a link and direct the user to my account page.
<?php
$welcomeMessage = $block->getWelcome();
?>
<?php switch ($block->getShowPart()):
case 'welcome': ?>
<li class="greet welcome" data-bind="scope: 'customer'">
<!-- ko if: customer().fullname -->
<span data-bind="text: new String('<?= $block->escapeHtml(__('Welcome, %1!', '%1')) ?>').replace('%1', customer().fullname)">
</span>
<!-- /ko -->
<!-- ko ifnot: customer().fullname -->
<a data-bind="attr: {href: myaccount_url}, html: name" class="product-item-link">
<span data-bind='html:"<?= $block->escapeHtml($welcomeMessage) ?>"'></span>
</a>
<?= $block->getBlockHtml('header.additional') ?>
<!-- /ko -->
</li>
<script type="text/x-magento-init">
{
"*": {
"Magento_Ui/js/core/app": {
"components": {
"customer": {
"component": "Magento_Customer/js/view/customer"
}
}
}
}
}
</script>
<?php break; ?>
<?php case 'other': ?>
<?= $block->getChildHtml() ?>
<?php break; ?>
<?php endswitch; ?>
Please help me to add my account URL here or let me know if any better way to achieve this. Thanks