1

I have been trying to add my account drop down menu in my magento website. I found that it is there in luma theme by default. But my base theme is magento/blank. My account links are displayed in a single line one by one, not as drop down. I have created app/design/frontend/vendor/theme/Magento_Customer/layout/default.xml and added the below code.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <attribute name="class" value="oothu-body-test"/>


    <referenceBlock name="header.links">
        <block class="Magento\Customer\Block\Account\Customer" name="customer" template="account/customer.phtml" before="-"/>
        <block class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link-login" template="account/link/authorization.phtml"/>
    </referenceBlock>



    <block class="Magento\Theme\Block\Html\Header" name="header" as="header">
        <arguments>
            <argument name="show_part" xsi:type="string">welcome</argument>
        </arguments>
    </block>


    <move element="header" destination="header.links" before="-"/>
    <move element="register-link" destination="header.links"/>
    <move element="top.links" destination="customer"/>
    <move element="authorization-link" destination="top.links" after="-"/>

</body>

Suddenly my account links are disappeared. I checked the

app/design/frontend/vendor/theme/Magento_Customer/templates/account/customer.php

file and I found out this page is not calling. I had added some sample data to that page before <?php if($block->customerLoggedIn()): ?>, but it is not showing on front end. Can any one please guide me?

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.