Skip to content

Can not add string to underscore template using knockout #18012

Closed
@DanielRuf

Description

@DanielRuf

Preconditions

  1. Magento 2.4-develop

Steps to reproduce

  1. create custom theme based on Luma
  2. extend Magento_Theme/frontend/web/templates/breadcrumbs.html
  3. add string to breadcrumbs.html using knockout
<ul class="items">
    <!-- ko i18n: 'You are here:' --><!-- /ko -->
    <% _.each(breadcrumbs, function(crumb) { %>
        <li class="item <%- crumb.name %>">
            <% if (crumb.link) { %>
            <a href="<%= crumb.link %>" title="<%- crumb.title %>"><%- crumb.label %></a>
            <% } else if (crumb.last) { %>
            <strong><%- crumb.label %></strong>
            <% } else { %>
            <%- crumb.label %>
            <% } %>
        </li>
    <% }); %>
    </ul>

Expected result

  1. the string "You are here:"
    image

Actual result

  1. No string shown
    image

Metadata

Metadata

Assignees

Labels

Component: ThemeFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions