Magento 2.2.2 - Display Customer Account header dropdown and remove Sign Out link post login The Next CEO of Stack OverflowHow can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Change “My Account” to “Sign in/Sign out” option in header in magento rwd theme?Magento 2.2.2 - Remove default welcome message and show username post loginRemove “Sign Out” link in header panel but keep “Sign Out” link in dropdownMagento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom Options

Is it okay to majorly distort historical facts while writing a fiction story?

Method for adding error messages to a dictionary given a key

Is it my responsibility to learn a new technology in my own time my employer wants to implement?

How to edit “Name” property in GCI output?

Running a General Election and the European Elections together

Is there a way to save my career from absolute disaster?

The past simple of "gaslight" – "gaslighted" or "gaslit"?

Why do remote US companies require working in the US?

Unclear about dynamic binding

Why is information "lost" when it got into a black hole?

What connection does MS Office have to Netscape Navigator?

Why doesn't UK go for the same deal Japan has with EU to resolve Brexit?

Writing differences on a blackboard

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

Should I tutor a student who I know has cheated on their homework?

Break Away Valves for Launch

Easy to read palindrome checker

Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?

TikZ: How to reverse arrow direction without switching start/end point?

How to delete every two lines after 3rd lines in a file contains very large number of lines?

What was the first Unix version to run on a microcomputer?

Do I need to write [sic] when a number is less than 10 but isn't written out?

What does "Its cash flow is deeply negative" mean?

Does increasing your ability score affect your main stat?



Magento 2.2.2 - Display Customer Account header dropdown and remove Sign Out link post login



The Next CEO of Stack OverflowHow can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Change “My Account” to “Sign in/Sign out” option in header in magento rwd theme?Magento 2.2.2 - Remove default welcome message and show username post loginRemove “Sign Out” link in header panel but keep “Sign Out” link in dropdownMagento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom Options










3















After successful login, Luma theme shows customer account details in dropdown on header as seen in below image



enter image description here



I need to replicate the same in our custom theme which has Blank as its parent.



Vendor/Theme/Magento_Theme/layout/default.xml



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header.panel">
<block class="MagentoFrameworkViewElementHtmlLinks" name="header.links">
<arguments>
<argument name="css_class" xsi:type="string">header links</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>


Vendor/Theme/Magento_Customer/layout/default.xml



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="header.links">
<block class="MagentoCustomerBlockAccountCustomer" name="customer" template="Magento_Customer::account/customer.phtml" before="-"/>
<block class="MagentoCustomerBlockAccountAuthorizationLink" name="authorization-link-login" template="Magento_Customer::account/link/authorization.phtml">
</block>
</referenceBlock>

<move element="top.links" destination="customer"/>
</body>
</page>


Vendor/Theme/Magento_Customer/templates/account/customer.phtml



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

// @codingStandardsIgnoreFile
/** @var MagentoCustomerBlockAccountCustomer $block */
?>
<?php if($block->customerLoggedIn()): ?>
<li class="customer-welcome">
<span class="customer-name"
role="link"
tabindex="0"
data-mage-init='"dropdown":'
data-toggle="dropdown"
data-trigger-keypress-button="true"
data-bind="scope: 'customer'">
<span data-bind="text: customer().fullname"></span>
<button type="button"
class="action switch"
tabindex="-1"
data-action="customer-menu-toggle">
<span><?= $block->escapeHtml(__('Change')) ?></span>
</button>
</span>
<script type="text/x-magento-init">

"*":
"Magento_Ui/js/core/app":
"components":
"customer":
"component": "Magento_Customer/js/view/customer"





</script>
<?php if($block->getChildHtml()):?>
<div class="customer-menu" data-target="dropdown">
<?= $block->getChildHtml() ?>
</div>
<?php endif; ?>
</li>
<?php endif; ?>


Here, when user is not logged in, I can see Sign In link but after user logs in I can see sign-out in user account dropdown on header as well as besides it. How do I resolve this?










share|improve this question
























  • have the same issue. Also, how to add the styling for the dropdown? in the tutorial they just say "the last touch is adding styles". But i can't find the correct styles in the luma directory devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/…

    – fogx
    Mar 29 '18 at 15:21















3















After successful login, Luma theme shows customer account details in dropdown on header as seen in below image



enter image description here



I need to replicate the same in our custom theme which has Blank as its parent.



Vendor/Theme/Magento_Theme/layout/default.xml



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header.panel">
<block class="MagentoFrameworkViewElementHtmlLinks" name="header.links">
<arguments>
<argument name="css_class" xsi:type="string">header links</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>


Vendor/Theme/Magento_Customer/layout/default.xml



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="header.links">
<block class="MagentoCustomerBlockAccountCustomer" name="customer" template="Magento_Customer::account/customer.phtml" before="-"/>
<block class="MagentoCustomerBlockAccountAuthorizationLink" name="authorization-link-login" template="Magento_Customer::account/link/authorization.phtml">
</block>
</referenceBlock>

<move element="top.links" destination="customer"/>
</body>
</page>


Vendor/Theme/Magento_Customer/templates/account/customer.phtml



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

// @codingStandardsIgnoreFile
/** @var MagentoCustomerBlockAccountCustomer $block */
?>
<?php if($block->customerLoggedIn()): ?>
<li class="customer-welcome">
<span class="customer-name"
role="link"
tabindex="0"
data-mage-init='"dropdown":'
data-toggle="dropdown"
data-trigger-keypress-button="true"
data-bind="scope: 'customer'">
<span data-bind="text: customer().fullname"></span>
<button type="button"
class="action switch"
tabindex="-1"
data-action="customer-menu-toggle">
<span><?= $block->escapeHtml(__('Change')) ?></span>
</button>
</span>
<script type="text/x-magento-init">

"*":
"Magento_Ui/js/core/app":
"components":
"customer":
"component": "Magento_Customer/js/view/customer"





</script>
<?php if($block->getChildHtml()):?>
<div class="customer-menu" data-target="dropdown">
<?= $block->getChildHtml() ?>
</div>
<?php endif; ?>
</li>
<?php endif; ?>


Here, when user is not logged in, I can see Sign In link but after user logs in I can see sign-out in user account dropdown on header as well as besides it. How do I resolve this?










share|improve this question
























  • have the same issue. Also, how to add the styling for the dropdown? in the tutorial they just say "the last touch is adding styles". But i can't find the correct styles in the luma directory devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/…

    – fogx
    Mar 29 '18 at 15:21













3












3








3


2






After successful login, Luma theme shows customer account details in dropdown on header as seen in below image



enter image description here



I need to replicate the same in our custom theme which has Blank as its parent.



Vendor/Theme/Magento_Theme/layout/default.xml



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header.panel">
<block class="MagentoFrameworkViewElementHtmlLinks" name="header.links">
<arguments>
<argument name="css_class" xsi:type="string">header links</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>


Vendor/Theme/Magento_Customer/layout/default.xml



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="header.links">
<block class="MagentoCustomerBlockAccountCustomer" name="customer" template="Magento_Customer::account/customer.phtml" before="-"/>
<block class="MagentoCustomerBlockAccountAuthorizationLink" name="authorization-link-login" template="Magento_Customer::account/link/authorization.phtml">
</block>
</referenceBlock>

<move element="top.links" destination="customer"/>
</body>
</page>


Vendor/Theme/Magento_Customer/templates/account/customer.phtml



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

// @codingStandardsIgnoreFile
/** @var MagentoCustomerBlockAccountCustomer $block */
?>
<?php if($block->customerLoggedIn()): ?>
<li class="customer-welcome">
<span class="customer-name"
role="link"
tabindex="0"
data-mage-init='"dropdown":'
data-toggle="dropdown"
data-trigger-keypress-button="true"
data-bind="scope: 'customer'">
<span data-bind="text: customer().fullname"></span>
<button type="button"
class="action switch"
tabindex="-1"
data-action="customer-menu-toggle">
<span><?= $block->escapeHtml(__('Change')) ?></span>
</button>
</span>
<script type="text/x-magento-init">

"*":
"Magento_Ui/js/core/app":
"components":
"customer":
"component": "Magento_Customer/js/view/customer"





</script>
<?php if($block->getChildHtml()):?>
<div class="customer-menu" data-target="dropdown">
<?= $block->getChildHtml() ?>
</div>
<?php endif; ?>
</li>
<?php endif; ?>


Here, when user is not logged in, I can see Sign In link but after user logs in I can see sign-out in user account dropdown on header as well as besides it. How do I resolve this?










share|improve this question
















After successful login, Luma theme shows customer account details in dropdown on header as seen in below image



enter image description here



I need to replicate the same in our custom theme which has Blank as its parent.



Vendor/Theme/Magento_Theme/layout/default.xml



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header.panel">
<block class="MagentoFrameworkViewElementHtmlLinks" name="header.links">
<arguments>
<argument name="css_class" xsi:type="string">header links</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>


Vendor/Theme/Magento_Customer/layout/default.xml



<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="header.links">
<block class="MagentoCustomerBlockAccountCustomer" name="customer" template="Magento_Customer::account/customer.phtml" before="-"/>
<block class="MagentoCustomerBlockAccountAuthorizationLink" name="authorization-link-login" template="Magento_Customer::account/link/authorization.phtml">
</block>
</referenceBlock>

<move element="top.links" destination="customer"/>
</body>
</page>


Vendor/Theme/Magento_Customer/templates/account/customer.phtml



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

// @codingStandardsIgnoreFile
/** @var MagentoCustomerBlockAccountCustomer $block */
?>
<?php if($block->customerLoggedIn()): ?>
<li class="customer-welcome">
<span class="customer-name"
role="link"
tabindex="0"
data-mage-init='"dropdown":'
data-toggle="dropdown"
data-trigger-keypress-button="true"
data-bind="scope: 'customer'">
<span data-bind="text: customer().fullname"></span>
<button type="button"
class="action switch"
tabindex="-1"
data-action="customer-menu-toggle">
<span><?= $block->escapeHtml(__('Change')) ?></span>
</button>
</span>
<script type="text/x-magento-init">

"*":
"Magento_Ui/js/core/app":
"components":
"customer":
"component": "Magento_Customer/js/view/customer"





</script>
<?php if($block->getChildHtml()):?>
<div class="customer-menu" data-target="dropdown">
<?= $block->getChildHtml() ?>
</div>
<?php endif; ?>
</li>
<?php endif; ?>


Here, when user is not logged in, I can see Sign In link but after user logs in I can see sign-out in user account dropdown on header as well as besides it. How do I resolve this?







magento2 layout customer xml custom-theme






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 8 '18 at 10:44







Slimshadddyyy

















asked Feb 8 '18 at 7:25









SlimshadddyyySlimshadddyyy

61511547




61511547












  • have the same issue. Also, how to add the styling for the dropdown? in the tutorial they just say "the last touch is adding styles". But i can't find the correct styles in the luma directory devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/…

    – fogx
    Mar 29 '18 at 15:21

















  • have the same issue. Also, how to add the styling for the dropdown? in the tutorial they just say "the last touch is adding styles". But i can't find the correct styles in the luma directory devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/…

    – fogx
    Mar 29 '18 at 15:21
















have the same issue. Also, how to add the styling for the dropdown? in the tutorial they just say "the last touch is adding styles". But i can't find the correct styles in the luma directory devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/…

– fogx
Mar 29 '18 at 15:21





have the same issue. Also, how to add the styling for the dropdown? in the tutorial they just say "the last touch is adding styles". But i can't find the correct styles in the luma directory devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/…

– fogx
Mar 29 '18 at 15:21










1 Answer
1






active

oldest

votes


















0














Add this to your css file:



.header.panel>.header.links>.customer-welcome+.authorization-link
display: none;






share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "479"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f212665%2fmagento-2-2-2-display-customer-account-header-dropdown-and-remove-sign-out-lin%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Add this to your css file:



    .header.panel>.header.links>.customer-welcome+.authorization-link
    display: none;






    share|improve this answer



























      0














      Add this to your css file:



      .header.panel>.header.links>.customer-welcome+.authorization-link
      display: none;






      share|improve this answer

























        0












        0








        0







        Add this to your css file:



        .header.panel>.header.links>.customer-welcome+.authorization-link
        display: none;






        share|improve this answer













        Add this to your css file:



        .header.panel>.header.links>.customer-welcome+.authorization-link
        display: none;







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        Frank007Frank007

        163




        163



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f212665%2fmagento-2-2-2-display-customer-account-header-dropdown-and-remove-sign-out-lin%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Sum ergo cogito? 1 nng

            419 nièngy_Soadمي 19bal1.5o_g

            Queiggey Chernihivv 9NnOo i Zw X QqKk LpB