Skip to content

Commit

Permalink
Merge pull request #3244 from projectblacklight/embed-block
Browse files Browse the repository at this point in the history
Pass the current block to the embed component.
  • Loading branch information
corylown authored Oct 25, 2024
2 parents 3e6bf24 + 78ee849 commit 50dc068
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="box" data-id="<%= document.id %>">
<% view_config = blacklight_config.view_config(:embed) %>
<%= render (view_config.document_component || Spotlight::SolrDocumentLegacyEmbedComponent).new((Blacklight.version > '8.0' ? :document : :presenter) => document_presenter(document), counter: nil) do |component| %>
<%= render (view_config.document_component || Spotlight::SolrDocumentLegacyEmbedComponent).new((Blacklight.version > '8.0' ? :document : :presenter) => document_presenter(document), counter: nil, block: local_assigns[:block]) do |component| %>
<% component.with_partial do %>
<%= render_document_partials document, view_config.partials, component: component, document_counter: nil, view_config: view_config, block: local_assigns[:block], **(view_config.locals) %>
<% end if view_config&.partials&.any? %>
Expand Down

0 comments on commit 50dc068

Please sign in to comment.