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

Are there languages with no euphemisms?

How to write papers efficiently when English isn't my first language?

Can "Reverse Gravity" affect Meteor Swarm?

Grabbing quick drinks

How to disable updates in WordPress theme

What happens if you roll doubles 3 times then land on "Go to jail?"

Implement the Thanos sorting algorithm

Failed to fetch jessie backports repository

Is a stroke of luck acceptable after a series of unfavorable events?

Creating a generator function for a large data set for a neural network

How can I quit an app using Terminal?

What is the purpose of the Potent Cantrip ability?

Why do remote companies require working in the US?

How do I construct this japanese bowl?

What is the point of a new vote on May's deal when the indicative votes suggest she will not win?

How to pronounce the slash sign

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

Only print output after finding pattern

Why does standard notation not preserve intervals (visually)

Why use "finir par" instead of "finir de" before an infinitive?

Opposite of a diet

Why is Miller's case titled R (Miller)?

declare as function pointer and initialize in the same line

How do I go from 300 unfinished/half written blog posts, to published posts?



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























    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



























      0














      Add this to your css file:



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





      share

























        0












        0








        0







        Add this to your css file:



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





        share













        Add this to your css file:



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






        share











        share


        share










        answered 3 mins 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

            HP P840 HDD RAID 5 many strange drive faiuresHP SmartArray P400: How to repair failed logical drive?Reusing Raid 5 Drive?reliably and automatically determine connection path of physical position of HDD from /dev/sdX device fileHow to replace failed drive in RAID 5 array in HP DL380 G4 serverQuestions on increasing RAID 5 arrayRaid 10, Logical device are missingHP Code 341 “Physical Drive State: Predictive failure. This physical drive is predicted to fail soon.”HPE 1.92TB SATA 6G Mixed Use SFF SSD very slow compared to SAS HDD HP disksHP drive array “ready for rebuild” (RAID5)Hard Disc Failure or RAID Glitch

            Jalkaväkirykmentti 49 (jatkosota) Sisällysluettelo Perustaminen | Keskittäminen | Komentaja(t) | Lähteet | NavigointivalikkoInfobox OKlaajentamalla

            Can Not View Content Blocks due to require.js error - Magento 2 theme change Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?get requirejs-config.js to load declared cdn's for jqueryOverride Magento/Checkout/view/frontend/web/js/view/shipping.js in custom theme not workingAdding Custom JS to Magento 2 Themerequire.js error on Magento 2Magento 2 require js throw errorMagento 2.1.2 regionUpdater js error on register.phtmlError loading popper.js on Magento 2 Theme (require js)requirejs error in my child themeIssue with bootstrap 4 in magento 2Magento 2 checkout page keeps on loading.In console,$.event.props is undefined in jquery.mobile.custom.js:44:2.How to clear that?Magento 2 Stuck on Checkout page