I am building a custom theme and I need to change the signin link name which is not contained in the layout file nor in the phtml file but only in the block class file. So should I build a module in the app/code directory or could I put this block class into the app/design directory?

  • mage2.pro/t/topic/914 go through this link – aravind May 16 '19 at 13:30
  • OK I need to extend the AuthorizationLink class, but where to put the class file?Is it possible to put it into the app/design/vendor/customtheme directory? – blob May 16 '19 at 13:37
  • Just you want to change the sign in text ? – aravind May 16 '19 at 13:38
  • You can override the block function in your custom module or you can change it using language translation.. – aravind May 16 '19 at 13:42

override vendor/magento/module-customer/i18n/en_US.csv In your theme

and put

"Sign In","test in"

What you need

if above not working then override authorization.phtml in your theme like this and put code as below:


     * Copyright © Magento, Inc. All rights reserved.
     * See COPYING.txt for license details.

    // @codingStandardsIgnoreFile

    /** @var \Magento\Customer\Block\Account\AuthorizationLink $block */

    $dataPostParam = '';
    if ($block->isLoggedIn()) {
        $dataPostParam = sprintf(" data-post='%s'", $block->getPostParams());
    <?php if (!$block->isLoggedIn()) :?>

    <li class="authorization-link" data-label="<?= $block->escapeHtmlAttr(__('or')) ?>">
        <a href="<?php echo $this->getUrl('customer/account/login'); ?>">
            <?php //= $block->escapeHtml($block->getLabel()) ?>
            <?php echo __('Login'); ?>
    <?php endif;?>
| 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.