I am not used to frontend development... We have a link like this:

<a class="primary button" data-bind="attr: { href: getUrl('my-special-page') } href="my-special-page">
    <span data-bind="i18n: 'Find out more'">Find out More</span>

Now, when I go to the page where the link is shown, it sometimes(!) links correctly to /my-special-page, and sometimes wrongly to /customer/account/my-special-page.

I was not able to find out under which circumstances it directs to which page; it seems to be random.

Normally, I would just statically link to /my-special-page, but my colleague might have used the getUrl thing for a good reason...

Does anyone know how to properly use this getUrl thing, and to make its behavior consistent?

  • Can you show us your getUrl function? – Khoa TruongDinh Nov 22 '18 at 2:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.