I want to show My account menu as drop-down and add Login/Logout link in it.
Currently it shows as separate menu link in top.links >> header.links
here is my default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="3columns" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="default_head_blocks" />
<body>
<referenceBlock name="top.links">
<block class="Magento\Wishlist\Block\Link" name="wish-list-link" before="my-account-link">
<block class="<vendor_name>\<module_name>\Block\WishlistCollection" name="wishlist_header" as="wishlist.header" template="<vendor_name_<module_name>::wishlist_items.phtml"/>
</block>
</referenceBlock>
<referenceContainer name="header.panel">
<block class="Magento\Cms\Block\Block" name="header_top_text" after="-">
<arguments>
<argument name="block_id" xsi:type="string">header_top_text</argument>
</arguments>
</block>
</referenceContainer>
<move element="top.links" destination="header-wrapper" after="minicart" />
<move element="authorization-link" destination="top.links" after="-"/>
<referenceBlock name="register-link" remove="true" />
<referenceBlock name="authorization-link" remove="false" />
<referenceBlock name="header" remove="true"/> <!-- remove welcome msg -->
<referenceBlock name="footer_links" remove="true" />
<referenceBlock name="report.bugs" remove="true" />
<referenceBlock name="catalog.compare.link" remove="true"/>
<!-- <move element="copyright" destination="before.body.end" /> -->
</body>
</page>
Any Suggestions how to set Login/Logout in my accountstrong text as drop-down.
Note : It's Custom theme with parent theme as blank so don't give suggestion with luma theme.
Best Answer
You need to create custom module for achieve this function.
Let me know if you have face any issue.