Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor DocumentPresenter#fields to use generic logic applicable for different types of field displays #2811

Merged
merged 5 commits into from
Jan 23, 2023

Conversation

cbeer
Copy link
Member

@cbeer cbeer commented Sep 26, 2022

This allows us to use common functionality for IndexPresenter + ShowPresenter, but also opens up a seam for view-specific field configuration (e.g. specific to atom/rss fields, gallery views, etc).

configure_blacklight do |config|
  config.view.gallery.document_fields_key :gallery_fields

  define_field_access :gallery_field, Blacklight::Configuration::IndexField

  config.add_gallery_index_field :field_1
  config.add_gallery_index_field :field_2
  config.add_gallery_index_field :field_3
end

@cbeer cbeer marked this pull request as ready for review September 26, 2022 19:47
@tampakis tampakis added this to the 8.0 milestone Oct 5, 2022
@sandbergja
Copy link
Contributor

@cbeer could you please rebase this? Thanks!

@jcoyne jcoyne merged commit 937f6e2 into main Jan 23, 2023
@jcoyne jcoyne deleted the document_fields_key branch January 23, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants