where can I find the main sidebar file location?
-
16-03-2021 - |
Решение
You can look into this file..
vendor/magento/module-theme/view/frontend/templates/html/collapsible.phtml
This sidebar section coming from here in My Account page.
You can override this file in your custom theme.
app/design/frontend/Vendor/Theme/Magento_Customer/layout/customer_account.xml
Content for this file is
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Customer My Account (All Pages)" design_abstraction="custom">
<body>
<referenceBlock name="sidebar.main.account_nav">
<action method="setTemplate">
<argument name="template" xsi:type="string">Magento_Customer::html/collapsible.phtml</argument>
</action>
</referenceBlock>
</body>
</page>
Now you need to create one template file here..
app/design/frontend/Vendor/Theme/Magento_Customer/templates/html/collapsible.phtml
You can copy below file's content there and you can make any modifications there..
vendor/magento/module-theme/view/frontend/templates/html/collapsible.phtml
Hope this will help you!
Другие советы
vendor\magento\module-customer\view\frontend\templates\account\navigation.phtml
is the main file which renders this list, it calls it child blocks to render the individual list items, so the items can be found in the layout file vendor\magento\module-customer\view\frontend\layout\customer_account.xml
passed as block arguments to child elements like below ;
<block class="Magento\Customer\Block\Account\SortLinkInterface" name="customer-account-navigation-account-link">
<arguments>
<argument name="label" xsi:type="string" translate="true">My Account</argument>
<argument name="path" xsi:type="string">customer/account</argument>
<argument name="sortOrder" xsi:type="number">250</argument>
</arguments>
</block>