magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.54k stars 9.32k forks source link

[Issue] Pass custom attributes to current link via XML #38500

Closed m2-assistant[bot] closed 2 weeks ago

m2-assistant[bot] commented 8 months ago

This issue is automatically created based on existing pull request: magento/magento2#30070: Pass custom attributes to current link via XML


Description (*)

Actualy we are able to add custom attributes for links in customer account navigation via XML for example:

    <referenceBlock name="customer-account-navigation-account-link">
        <arguments>
            <argument name="attributes" xsi:type="array">
                <item name="class" xsi:type="string">account-custom-class</item>
            </argument>
        </arguments>
    </referenceBlock>

But when customer-account-navigation-account-link is as current page in this case it is https://sample.com/customer/account/ our custom attribute dosn't show because method getAttributesHtml() isn't used for current link.

For non-current link method getAttributesHtml() is used.

Contribution checklist (*)

m2-assistant[bot] commented 6 months ago

Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-November commented 6 months ago

Hello @mattkrupnik,

Thank you for the report and collaboration!

Verified this on 2.4-develop. As the getAttributesHtml() function is skipped for current url, this issue can be confirmed. Hence marking it the same.

Thank you.

github-jira-sync-bot commented 6 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-11809 is successfully created for this GitHub issue.

m2-assistant[bot] commented 6 months ago

:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.