Closed ebenenglish closed 3 months ago
We should also use the #render_title
method for the exemplary image details on collections#show
.
The collection image title is set in CollectionsControllerBehavior#collection_image_info
:
col_img_info[:title] = col_img_obj_doc[blacklight_config.index.title_field.to_sym]
So we will need to call the helper method from the controller, this may work:
col_img_info[:title] = helpers.render_title(col_img_file_doc)
AND
We should also use #render_title
in app/views/catalog/_opengraph.html.erb
.
Blacklight uses the
Blacklight::DocumentPresenter#html_title
method to provide the page title text used in the HTML<head><title>
element (app/presenters/blacklight/document_presenter.rb
).We want to incorporate the fully rendered title (
MetadataHelperBehavior#render_title
) so that we get this:Instead of:
The latter is bad for SEO, since there are thousands of pages with the same title. Search engine crawlers may not interpret these as unique pages.