1

Where do I start if I want to update the text of login on the frontend to a icon? I have installed grunt, downloaded the css libraries and icon sets but Im stuck. A hint?

I also wonder how I can convert the login text link to a custom button..

  • Were you able to achieve the result you were looking for? I'm having the same question. – Mohammed Joraid May 5 '18 at 12:08
5

To change login text link You can start with template vendor/magento/module-customer/view/frontend/templates/account/link/authorization.phtml. Add new method to verify if user is login/logout and add class and text whatever you want.

<li class="authorization-link" data-label="<?php echo $block->escapeHtml(__('or')); ?>">
    <a <?php /* @escapeNotVerified */ echo $block->getLinkAttributes(); ?><?php /* @escapeNotVerified */ echo $dataPostParam; ?>>
        <span class="<?php echo $this->isLoggedIn() ? __('class-log-in') : __('class-log-out'); ?>">
            <?php echo $this->isLoggedIn() ? __('Sign Out Custom Text') : __('Sign In Custom Text'); ?>
        <span/>
    <a/>
</li>

Then You can customize your <span class="class-log-in"> or <span class="class-log-out"> in *.less file with mixin:

.lib-icon-font(@your-icon-name);
| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.